try to solve java version for supporting generics