In Java 6, other than adding @SuppressWarnings("unchecked")
, I don’t think so.
This bug report has more information but it boils down to the compiler not liking arrays of generic types.
More Related Contents:
- What is PECS (Producer Extends Consumer Super)?
- Difference between
- Java Generics (Wildcards)
- Java generics super keyword
- Java Enum definition
- What does the question mark in Java generics’ type parameter mean? [duplicate]
- Create instance of generic type in Java?
- Why can’t I use a type argument in a type parameter with multiple bounds?
- Why can’t a Generic Type Parameter have a lower bound in Java?
- Generic type parameter naming convention for Java (with multiple chars)?
- Implement converters for entities with Java Generics
- LambdaConversionException with generics: JVM bug?
- Why does this generic code compile in java 8?
- How to create a class literal of a known type: Class
- Java nested generic type
- Why shouldn’t Java enum literals be able to have generic type parameters?
- What is the difference between bounded wildcard and type parameters?
- Java HashMap nested generics with wildcards
- Create a List of primitive int?
- Bug in eclipse compiler or in javac (“type parameters of T cannot be determined”)
- What is the point of allowing type witnesses on all method calls?
- Java collections covariance problem
- Get type name for generic parameter of generic class [duplicate]
- Java: bounded wildcards or bounded type parameter?
- Generic class that accepts either of two types
- List is a raw type. References to generic type List should be parameterized
- incompatible types and fresh type-variable
- Java nested generic type mismatch
- Storing different types of elements in a List in Java
- ArrayList Generic without Type