Diamond operator no longer working... ?
Rémi Forax
forax at univ-mlv.fr
Fri Mar 18 22:39:59 UTC 2011
On 03/18/2011 06:01 PM, assembling signals wrote:
> Hello, community!
Hello Ivan,
> I noticed a new error since b134: "Cannot use '<>' with anonymous inner classes".
> The code uses diamond syntax and was error-free before b134.
> (Please see reproducible example at the end.)
>
> Can someone explain: is this error even intended?
Yes.
see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7020044
> If so, why this is necessary?
Quote from JSR334 (coin) EDR:
Using diamond with anonymous inner classes is /not/ supported since
doing so would require extensions to the class file signature attribute,
a de facto JVM change.
> If not, is it possible to revert to old behavior?
No
> (BTW: Latest Netbeans even allow to refactor anon-inner-classes to use diamond syntax.)
>
> Best regards,
> Ivan G Shevchenko
Rémi
More information about the core-libs-dev
mailing list