Whoa, StackOverflow error

I totally cracked myself up at work yesterday. I managed to run some code that threw a StackOverflow error.

It was something along the lines of:


public String getSender() { return this.getSender(); }

I had copy-and-pasted some class template code from elsewhere in the (huge, sprawling) code base. Which contained this error, but was not ever called in the that location, so it never showed up. (So it’s not my fault really, but I should have caught it. Oh wait, I did!)

Oh, the dangers of copy and paste.