try to solve java version for supporting generics 2