HRCPP-64 Workaround the fact that the Java 6 compiler has trouble with inferring the return type of a generic

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

https://issues.jboss.org/browse/HRCPP-64