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.
Build: NetBeans IDE Dev (Build 201505040001) VM: Java HotSpot(TM) 64-Bit Server VM, 25.60-b12, Java(TM) SE Runtime Environment, 1.8.0_60-ea-b13 OS: Windows 7 User Comments: lhochet: In the progress of adjusting some code, sample after is a reduction of the actual code that produces the exception for any attempt to modify it, it seems it is important that it is a DirectoryStream as replacing with Closeable does no longer produce the NPE (generics removed in the process of reducing the sample): import java.nio.file.DirectoryStream; public class NewClass { private static void test() { try (DirectoryStream stream = null) { { } catch (IOException ex) {} } } Stacktrace: java.lang.NullPointerException at com.sun.tools.javac.model.JavacTypes.asMemberOf(JavacTypes.java:281) at org.netbeans.modules.java.hints.errors.UncaughtException.run(UncaughtException.java:244) at org.netbeans.modules.java.hints.infrastructure.CreatorBasedLazyFixList.compute(CreatorBasedLazyFixList.java:147) at org.netbeans.modules.java.hints.infrastructure.LazyHintComputation.run(LazyHintComputation.java:112) at org.netbeans.modules.java.hints.infrastructure.LazyHintComputation.run(LazyHintComputation.java:58) at org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper.run(JavaSourceAccessor.java:298)
Created attachment 153514 [details] stacktrace
Created attachment 153523 [details] stacktrace I removed catch block and method became uncompilable.
Created attachment 153605 [details] stacktrace Typing in editor
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=217105
Created attachment 153910 [details] stacktrace Pasting
Created attachment 154036 [details] stacktrace pasted code from one class to another and used code completion
Created attachment 154388 [details] stacktrace copy pasted java code from one method to another
Created attachment 154649 [details] stacktrace I pasted block of code to a method.
Created attachment 155842 [details] stacktrace Copy/paste
This bug already has 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=217105
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/f72eaf5d318e
Integrated into 'main-silver', will be available in build *201509050002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/f72eaf5d318e User: Dusan Balek <dbalek@netbeans.org> Log: Issue #252230 - NullPointerException at com.sun.tools.javac.model.JavacTypes.asMemberOf - fixed.