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.
while editing an interface, got a null pointer exception : Annotation: Exception occurred in Request Processor java.lang.NullPointerException at org.netbeans.modules.java.codesync.ClassDependencyImpl.appl yChanges(ClassDependencyImpl.java:599)
Created attachment 7887 [details] ide.log
Reassigning to java module.
*** Issue 26879 has been marked as a duplicate of this issue. ***
Sorry, can not reproduce. Please try to describe steps that could produce the bug.
I just got this exact same exception, in 3.4.1 final. The code I'm working on has a little bit of an involved inheritance structure, which may be what prompts this error. I will now describe that structure, hopefully that will help you reproduce it. Sorry, I can't provide the source code (... heard it before? :) I have a class, call it C, and two others which derive from it, call them Cd1 and Cd2. C contains a protected nested interface C.i, and two protected nested implementations of it, C.c1 and C.c2. Cd1 contains a protected nested interface Cd1.i which extends C.i, and two protected nested implementations of Cd1.i, called Cd1.c1 and Cd1.c2, which extend C.c1 and C.c2 respectively. I got this exception from the code-sync that occurred when I moved two methods from Cd1.i to C.i. More precisely, I block-selected two methods out of Cd1.i, hit Ctrl-X to cut them, placed the cursor inside C.i and hit Ctrl-V to paste them, and saved. The resulting codesync threw the exception. The nested classes and interfaces are static, not "inner" (i.e. class-bound, not instance-bound) Before anyone says my inheritance structure is way too weird: I'm implementing two "implementation flavors" of this class hierarchy, whose differences are quite minor. I am trying to isolate those differences in nested classes, rather than produce two entire separate hierarchies with mostly duplicated code (because code duplication is practiced only by, uh, "evil-doers").
I now get the same exception again, if I change some aspect of the methods in C.i -- even if I change only the methods that were there already before the paste (i.e. before I saw this exception for the first time).
By the way, the methods I pasted into C.i are not implemented in C.c1 and C.c2; these two nested classes are abstract. I now tried simplifying the structure by throwing out Cd1.i and Cd2.i, so I now have C.i with all the methods from Cd1.i and Cd2.i C.c1 and C.c2 are abstract and implement only some of these methods Cd1.c1 and Cd1.c2 extend C.c1 and C.c2 respectively, but are concrete, and now do not implement any other interface. ... and I still get the codesync exception when I change anything in C.i.
*** This issue has been marked as a duplicate of 29414 ***