Groovy is a dynamically typed language and hence your variables need not be assigned the type information as these are determined dynamically at run time. That is the reason why the code executes without issues
Groovy wasnt designed to behave like Java, it was designed to create a language which in dynamically typed, easy to program. Even in Java the Generics information is not part of the code at runtime, you might want to read about Type Erasure. So when it comes to Groovy it doesnt even consider the type information you specify during the generic declaration. Its there to help you use Java API. You can read more about it here.