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 28573 - null pointer while editing java
Summary: null pointer while editing java
Status: RESOLVED DUPLICATE of bug 29414
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
: 26879 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-11-07 17:27 UTC by schwarcz
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ide.log (9.23 KB, text/plain)
2002-11-07 17:31 UTC, schwarcz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description schwarcz 2002-11-07 17:27:57 UTC
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)
Comment 1 schwarcz 2002-11-07 17:31:40 UTC
Created attachment 7887 [details]
ide.log
Comment 2 Martin Roskanin 2002-11-08 08:25:59 UTC
Reassigning to java module.
Comment 3 Svata Dedic 2003-01-07 12:23:41 UTC
*** Issue 26879 has been marked as a duplicate of this issue. ***
Comment 4 Svata Dedic 2003-01-07 15:37:41 UTC
Sorry, can not reproduce. Please try to describe steps that could
produce the bug.
Comment 5 gthb 2003-01-23 18:29:07 UTC
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").
Comment 6 gthb 2003-01-23 18:55:02 UTC
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).
Comment 7 gthb 2003-01-23 19:12:11 UTC
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.
Comment 8 Tomas Hurka 2003-02-18 12:01:18 UTC

*** This issue has been marked as a duplicate of 29414 ***