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 32634 - NPE from ModifierEditor.addPCL under GTK+ L&F
Summary: NPE from ModifierEditor.addPCL under GTK+ L&F
Status: CLOSED DUPLICATE of bug 32682
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords: JDK_SPECIFIC, L&F
Depends on:
Blocks:
 
Reported: 2003-04-04 15:32 UTC by Jesse Glick
Modified: 2011-06-09 09:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace (2.91 KB, text/plain)
2003-04-04 15:34 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2003-04-04 15:32:43 UTC
dev 030402. Run with -ui
com.sun.java.swing.plaf.gtk.GTKLookAndFeel under
1.4.2b19. In Explorer, browse to the class node
beneath a Java source node. An exception is thrown.
Comment 1 Jesse Glick 2003-04-04 15:34:19 UTC
Created attachment 9709 [details]
Stack trace
Comment 2 Jesse Glick 2003-04-04 15:34:46 UTC
Probably also occurs in 3.5, please check.
Comment 3 _ tboudreau 2003-04-08 17:54:29 UTC
Having fixed issue 32633 (popup menu), I find this also occurs when
you choose Add Field from the fields node of a class.

I added some logging to ModifiersEditor, before the line where the
NPE occurs.  Results:

support = null
PCL = com.sun.java.swing.plaf.gtk.SynthPanelUI@1c8e807
Thread= Thread[AWT-EventQueue-0,6,IDE Main]

support - an instance of PropertyChangeSupport is null.  The only
code that sets the value of support is the second line of the 
constructor.  What is weird about this is that it appears the
constructor simply never runs for this class (tried adding
while (support == null) {} to addPropertyChangeListener - the
result was an endless loop - so it's not just getting called
before the constructor completes).
Comment 4 Jesse Glick 2003-04-08 18:56:33 UTC
Look at the stack trace. addPropertyChangeListener is being called
from the super constructor, before the fields have been initialized.
Component.addPCL implements this correctly, but ModifierEditor does not.

Recommended fix: patch ModifierEditor to remove the addPCL and
removePCL methods, since the superclass already defines them perfectly
well. Replace support.firePropertyChange(...) with
firePropertyChange(...).
Comment 5 Tomas Hurka 2003-04-09 10:02:11 UTC

*** This issue has been marked as a duplicate of 32682 ***
Comment 6 Quality Engineering 2007-09-20 10:47:04 UTC
Reorganization of java component
Comment 7 Marian Mirilovic 2011-06-09 09:51:07 UTC
v/c