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 81645 - NPE from PropertySheet on deleting 'orderDate' attribute from 'purchaseOrder' element
Summary: NPE from PropertySheet on deleting 'orderDate' attribute from 'purchaseOrder'...
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Ayub Khan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-02 02:09 UTC by Ayub Khan
Modified: 2006-10-05 21:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ayub Khan 2006-08-02 02:09:41 UTC
Got following NPE on deleting 'orderDate'attribute from 'purchaseOrder' element.

Steps to reproduce:
1. create purchaseOrder schema
2. In the Design view click purchaseOrder element, then expand attributes, and
select 'orderDate' attribute to show the property sheet for orderDate.
3. Now delete the 'orderDate' attribute. This will cause a NPE, like below.

java.lang.NullPointerException
        at org.netbeans.modules.xml.axi.impl.AttributeProxy.getName(AttributePro
xy.java:69)
        at org.netbeans.modules.xml.schema.abe.nodes.AttributeNode.getName(Attri
buteNode.java:147)
        at java.beans.FeatureDescriptor.getDisplayName(FeatureDescriptor.java:61
)
        at org.openide.explorer.propertysheet.PropertySheet$TabSelectionListener
.stateChanged(PropertySheet.java:898)
        at org.openide.explorer.propertysheet.BaseTable.fireChange(BaseTable.jav
a:1014)
        at org.openide.explorer.propertysheet.BaseTable.doFocusLost(BaseTable.ja
va:1108)
        at org.openide.explorer.propertysheet.BaseTable.access$700(BaseTable.jav
a:102)
        at org.openide.explorer.propertysheet.BaseTable$2.windowDeactivated(Base
Table.java:1124)
        at java.awt.AWTEventMulticaster.windowDeactivated(AWTEventMulticaster.ja
va:342)
        at java.awt.AWTEventMulticaster.windowDeactivated(AWTEventMulticaster.ja
va:341)
Comment 1 Girish Balachandran 2006-08-02 20:43:31 UTC
Fixed in trunk. Will merg in to beta after code review.
Comment 2 Girish Balachandran 2006-08-02 23:48:23 UTC
Fixed in cokebeta branch on 8/2.
Comment 3 htt 2006-08-11 20:37:46 UTC
Fix was verified in build 060808_2.  The issue is now resurfaced in RC1.
Comment 4 Ayub Khan 2006-08-14 20:20:54 UTC
I am fixing the possible NPE in these ABE Nodes

/cvs/xml/schema/abe/src/org/netbeans/modules/xml/schema/abe/nodes/Attic/AnyElementNode.java,v
 
new revision: 1.1.2.5; previous revision: 1.1.2.4

/cvs/xml/schema/abe/src/org/netbeans/modules/xml/schema/abe/nodes/Attic/AttributeNode.java,v
 
new revision: 1.1.2.12; previous revision: 1.1.2.11

/cvs/xml/schema/abe/src/org/netbeans/modules/xml/schema/abe/nodes/Attic/ContentModelNode.java
new revision: 1.1.2.4; previous revision: 1.1.2.3

/cvs/xml/schema/abe/src/org/netbeans/modules/xml/schema/abe/nodes/Attic/NamespaceNode.java,v
 
new revision: 1.1.2.4; previous revision: 1.1.2.3

/cvs/xml/schema/abe/src/org/netbeans/modules/xml/schema/abe/nodes/Attic/ElementNode.java,v
 
new revision: 1.1.2.22; previous revision: 1.1.2.21

/cvs/xml/schema/abe/src/org/netbeans/modules/xml/schema/abe/nodes/Attic/CompositorNode.java,v
 
new revision: 1.1.2.9; previous revision: 1.1.2.8

Comment 5 Ayub Khan 2006-08-14 21:55:17 UTC
Fixed in trunk (release55)
Comment 6 Ayub Khan 2006-10-05 21:53:59 UTC
Verified in  (release_dev) build 20061005