HRCPP-64 Workaround the fact that the Java 6 compiler has trouble with inferring the return type of a generic
         method when unboxing is also needed