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.
Product Version = NetBeans IDE 8.0 (Build 201403101706) Operating System = Windows 8 version 6.2 running on amd64 Java; VM; Vendor = 1.8.0 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.0-b70 Consider this class (imply an import for java.util.concurrent.Callable): class MissingThrowsDeclarationWhenConvertingLambdaExpressionToAnonymousInnerClass { void bug() { java.util.concurrent.Callable<String> c = () -> { throw new Exception(); }; } } It compiles fine because Callable<V>'s method is declared as: V call() throws Exception; NetBeans suggests "Use anonymous inner class" which results in: class MissingThrowsDeclarationWhenConvertingLambdaExpressionToAnonymousInnerClass { void bug() { Callable<String> c = new Callable<String>() { public String call() { throw new Exception(); // "unreported exception Exception; must be caught or declared to be thrown" } }; } } It does not add a throws declaration, therefore resulting in a compiler error.
Fixed in jet-main#d5b5dabaf3df
Apologies, incorrect bug for the message.
Fixed in jet-main#2c75e687dc17
Integrated into 'main-silver', will be available in build *201408070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/2c75e687dc17 User: Svata Dedic <sdedic@netbeans.org> Log: #243095: throws clause copied from the implemented iface method