Skip to content

Java compiler bug with generics

coursermonster.wordpress.com
2 pointsmcharkindiscuss
On HN

Today I spent half a day debugging my code. I just completed a major redesign of a chunk of it thought I must have screwed something up badly. Well although I did screw it up, it was in a place where the compiler should have caught it.

Although the generics in java are better than not having anything, and they make my life a lot easier not needing to cast, they are still a bit buggy. Has anybody experienced something like this before, know what is causing this, and how to avoid this headache later? (see post for code)

Comments

No comments yet.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.