This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Example: class Test { interface Interval<T extends Comparable<? super T>> { T minimum(); T maximum(); } void f(Object obj) { if (obj instanceof Interval && ((Interval<?>) obj).minimum() instanceof Integer) { // ... } } } The editor shows the following compiler error for the second "instanceof" expression: inconvertible types required: java.lang.Integer found: capture #nnn of ? The code though is correct and compiles without errors with JDK 1.6, and no error is shown by the NetBeans 6.5 editor.
Seems like a regression in the JDK1.7 compiler (1.6 compiles fine, errors while using 1.7).
Copy & paste from the e-mail I've got from the javac people: ------------------------------------------------------------------------------------------------------------------------- This seems a regression from 6548436 - cast conversion has a lot of problems in javac - and I'm trying to address them... I guess this is one of those areas in which you do two steps further and a step beyond :-( I might need to spend some time on this - I'll keep you informed as soon as I discover a fix. -------------------------------------------------------------------------------------------------------------------------
Bug in JDK1.7 compiler. WONTFIX on NB side.