I remember to have read about a new feature of JDK7 (now also supported by the Netbeans editor, yet only in current trunk builds).
This tiny feature wouldn't produce a warning anymore when instanceof SomeClass<?>
is written without the type variable.
How is this feature it called?
Do someone know any reference, where it is described?
Most important: are there other changes in JDK7 related to type variables?
I believe you are speaking of the Simplified Varargs Method Invocation proposal from Bob Lee. It was a coin proposal and is now included in JSR 334 for Java 7 (JSR 336).
The only other change I know of is the Improved Type Inference for Generic Instance Creation (diamond) change.
The use of <>
is called the "Improved Type Inference for Generic Instance Creation" or "diamond" pattern, and it is part of Project Coin.
Although your issue (instanceof SomeClass<>
) sounds slightly different.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With