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 38737 - NPE when creating a class in default package
Summary: NPE when creating a class in default package
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-14 13:22 UTC by Tomas Pavek
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

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 Tomas Pavek 2004-01-14 13:22:01 UTC
Build 200401131900, jdk 1.4.2_01

Run fresh build and try to create a JFrame form in
the sample dir (i.e. in default package). An
exception is thrown and the created form is not
opened. The same happens for any java file. After
opening the file, package statement is incorrect.

Looks like caused by fix of issue 38335.

java.lang.NullPointerException
 at
org.netbeans.modules.java.JavaDataObject.updateSource(JavaDataObject.java:553)
 at
org.netbeans.modules.java.JavaDataObject.updateSourceStart(JavaDataObject.java:500)
 at
org.netbeans.modules.java.JavaDataObject.updateSourceStart(JavaDataObject.java:476)
 at
org.netbeans.modules.java.JavaDataObject.handleCreateFromTemplate(JavaDataObject.java:697)
 at
org.openide.loaders.DataObject$7.run(DataObject.java:693)
 at
org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:89)
 at
org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:415)
 at
org.openide.loaders.DataObjectPool.runAtomicAction(DataObjectPool.java:188)
 at
org.openide.loaders.DataObject.invokeAtomicAction(DataObject.java:750)
 at
org.openide.loaders.DataObject.createFromTemplate(DataObject.java:691)
 at
org.netbeans.modules.java.ui.wizard.JavaWizardIterator.instantiateTemplate(JavaWizardIterator.java:176)
...
Comment 1 Tomas Pavek 2004-01-14 13:24:12 UTC
Well, probably not P1...
Comment 2 ehucka 2004-01-14 13:47:10 UTC
I cannot reproduce it. Is it thrown only in sampledir? I'm using the
build on old userdir and all is OK.
Comment 3 Jan Pokorsky 2004-01-14 14:23:48 UTC
I can. You have to create a new java file in the default package and
not use the default name.
Comment 4 Jan Pokorsky 2004-01-14 15:01:23 UTC
fixed in
/cvs/java/src/org/netbeans/modules/java/JavaDataObject.java
new revision: 1.174; previous revision: 1.173
Comment 5 ehucka 2004-02-19 10:09:36 UTC
Verified.
Comment 6 ehucka 2004-02-19 11:53:19 UTC
I forgot.