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.
Worked in netbeans 8.0.2 Broken in netbeans 8.2 Issue 1: Set<? extends String> getFoo() { ... } ... Set<String> v = new HashSet<>(getFoo()); // reports error: HashSet<CAP#1> cannot be converted to Set<String> Set<String> v = new HashSet<String>(getFoo()); // OK Issue 2: class Foo<E extends Exception> { public void foo() throws E; } class Bar extends Foo<RuntimeException> { ... } new Bar().foo(); // NetBeans 8.2 thinks this throws E, 8.0.2 knew it was only a RuntimeException and so not checked.
NetBeans 8.0.2 and 8.2 both ran on JDK1.8 Issue 2 also related to updating underlying java project to use JDK1.8. Issue 1 project JDK not changted.
I have found a critical difference with JDK (outside netbeans): 1.8.0_72 (Azul Zulu) can compile the code in -source 1.7 but not in -source 1.8 1.8.0_151 (Oracle) can compile the code in -source 1.7 and -source 1.8
Note that the failing netbeans was running on Oracle JDK 1.8, though. This just leads me to wonder whether it found (or includes) an old tools.jar somewhere.