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.

Bug 192718 - Cannot infer type arguments for [...]
Summary: Cannot infer type arguments for [...]
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: JDK Problems (show other bugs)
Version: 7.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Antonin Nebuzelsky
URL: http://bugs.sun.com/bugdatabase/view_...
Keywords: REGRESSION
Depends on: 192146
Blocks:
  Show dependency tree
 
Reported: 2010-11-30 22:13 UTC by converginglight
Modified: 2010-12-02 10:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description converginglight 2010-11-30 22:13:09 UTC
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<>() {
        };
    }

}
Comment 1 Dusan Balek 2010-12-02 10:21:20 UTC
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.