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.
Same example code as in #192146 but this time, replace FileVisitor<Path> fv = new SimpleFileVisitor<Path> with FileVisitor<Path> fv = new SimpleFileVisitor<> and the error is there again. = = = = = = = = = = CODE = = = = = = = = = = import java.nio.file.*; import java.util.concurrent.*; public class _NBFormattingRegression2 { static abstract class MyCallable<V> implements Callable<V> { } public static void main(String... args) { // WORKS Callable<String> c = new MyCallable<>() { @Override public String call() { return null; } }; // ERROR: cannot infer type arguments for SimpleFileVisitor<> FileVisitor<Path> fv = new SimpleFileVisitor<>() { }; } }
A bug JDK1.7 javac compiler (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6996914) fixed in b120. Will be fixed in NB with the next regular merge of the recent JDK javac changes into NB repository. Closing as WONTFIX on NB side.