I have a code like this:
protected T doSomething(String someParam, Class clazz) { ... }
which I use in a TestCase class:
Which compiler are you using? In this case http://code.google.com/p/jclouds/issues/detail?id=461 the openjdk seems to reveal the incompatible types while the sun jdk ignores it and compiles.