Ah yeah I remember the bug in Java 6 compiler since Java spec defined it should work but it doesn't :) Yeah adding casts.