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.
1. Create a new Project > Java > Java Application 2. Copy the code below in a "Test" class in the default package: import java.util.stream.Stream; public class Test { public static void main(String[] args) { A<Integer> a = new A<> (); a.max(); } static class A<T extends Number & Comparable<? super T>> { public T max() { return s().max(T::compareTo).orElse(null); } public Stream<T> s() { return Stream.empty(); } } } 3. Right click > Run file The output shows an exception: Exception in thread "main" java.lang.BootstrapMethodError: call site initialization exception .... Caused by: java.lang.invoke.LambdaConversionException: Invalid receiver type class java.lang.Number; not a subtype of implementation type interface java.lang.Comparable 4. Clean & Build and run again: no output as expected 5. Insert a space in the file and run again: exception 6. From the command line, in the directory where the Test.java file is located: javac -d . Test.java java -cp . Test outputs nothing as expected.
Fixed in 8.1