Reputation: 11216
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?
Upvotes: 10
Views: 744
Reputation: 70239
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.
Upvotes: 2
Reputation: 189866
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.
Upvotes: 1