Recent Representative Line

A single line of code from a large application that somehow manages to provide an almost endless insight into the pain that its maintainers face each day.

May 2008

Very Specific Generics

by in Representative Line on

"I'm as much a fan of Java Generics as the next guy," writes Jim Bethancourt, "why bother with writing all that type-specific code for common collections (or - gasp - losing type safety) when one can simply go  HashMap<String, SomeObject>."

"However, after working on several of my predecessor's projects, I think it's pretty clear that liked generics, too. But I'm gonna go ahead and say that he liked them juuuuuust a bit too much. This was one of way-too-many lines in the variable definition section of some (you guessed it) generic class...