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 15124 - ClassElement throws NPE when an empty array of MethodElements is added
Summary: ClassElement throws NPE when an empty array of MethodElements is added
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-09-04 14:50 UTC by Martin Ryzl
Modified: 2007-09-26 09:14 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 Martin Ryzl 2001-09-04 14:50:27 UTC
use an empty array of MethodElements as an argument to ClassElement.setMethods. It throws the exception.
An array with at least one item works well.

Tue Sep 04 15:46:03 GMT+02:00 2001: java.lang.NullPointerException: null
java.lang.NullPointerException
        at java.lang.System.arraycopy(Native Method)
        at org.netbeans.modules.java.model.PartialCollection.doSetMembers(Partia
lCollection.java:505)
        at org.netbeans.modules.java.model.PartialCollection.setMembers(PartialC
ollection.java:357)
        at org.netbeans.modules.java.model.PartialCollection.changeMembers(Parti
alCollection.java:639)
        at org.netbeans.modules.java.model.ClassElementImpl.changeMethods(ClassE
lementImpl.java:401)
        at org.openide.src.ClassElement.setMethods(ClassElement.java:472)
        at org.netbeans.modules.rmi.wizard.RMIWizardIterator.instantiateInterfac
e(RMIWizardIterator.java:364)
        at org.netbeans.modules.rmi.wizard.RMIWizardIterator.instantiate(RMIWiza
rdIterator.java:148)
        at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.j
ava:496)
        at org.openide.loaders.TemplateWizard.instantiateImpl(TemplateWizard.jav
a:455)
        at org.openide.loaders.TemplateWizard.instantiate(TemplateWizard.java:37
9)
        at org.openide.actions.NewTemplateAction.performAction(NewTemplateAction
.java:112)
        at org.openide.util.actions.NodeAction.performAction(NodeAction.java:96)

        at org.netbeans.core.actions.NewTemplateCallableAction.performAction(New
TemplateCallableAction.java:65)
        at org.openide.util.actions.CallableSystemAction.actionPerformed(Callabl
eSystemAction.java:66)
        at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:85)
        at org.openide.util.Task.run(Task.java:152)
[catch] at org.openide.util.RequestProcessor$ProcessorThread.run(RequestProcesso
r.java:611)
Comment 1 Svata Dedic 2001-09-05 13:25:34 UTC
Fixed in dev trunk.
Comment 2 Jan Becicka 2001-10-05 13:15:11 UTC
[200110050100] Verified
Comment 3 Quality Engineering 2003-07-01 13:18:48 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.