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 124200 - NullPointerException at org.netbeans.modules.apisupport.project.CreatedModifiedFilesFactory$AddModuleDependency.run
Summary: NullPointerException at org.netbeans.modules.apisupport.project.CreatedModifi...
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milos Kleint
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-18 14:54 UTC by _ theanuradha
Modified: 2008-01-22 08:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 16395


Attachments
stacktrace (1.37 KB, text/plain)
2007-12-18 14:55 UTC, _ theanuradha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ theanuradha 2007-12-18 14:55:00 UTC
Build: NetBeans IDE Dev (Build 071218)
VM: Java HotSpot(TM) Client VM, 1.6.0_10-ea-b07
OS: Windows XP, 5.1, x86

User Comments: 
try new Topcomponent in maven project
Comment 1 _ theanuradha 2007-12-18 14:55:04 UTC
Created attachment 54362 [details]
stacktrace
Comment 3 Jesse Glick 2008-01-21 19:21:41 UTC
Maybe I'm missing something but how can an NPE in apisupport be fixed by a change in MevenIDE? If a change in MevenIDE
causes the bug to no longer be _triggered_, then fine, but an NPE is still a logic error.
Comment 4 Milos Kleint 2008-01-22 08:18:49 UTC
well, the wizard was adding multiple dependencies. After each addition, the pom.xml file gets saved and project gets
reloaded (I know it's not ideal, but that's how the SPI is designed right now)
The dependency addition had a bug of not adding version to dependency in some cases. That rendered the pom.xml file
invalid and the maven support fallbacked to "empty" definition of a project. The "nbm" packaging disappeared and the
NbModuleProvider disappered from project's lookup -> causing NPE.

The NPE itself shall not be fixed IMHO in the apisupport codebase. Erratic switches from "is netbeans module" to "isn't
netbeans module" within a single New File wizard instance is not something we want to fix IMHO.


Thanks for catching this and making me think harder about why the error disappeared. I'm pretty confident now the issue
is gone.

marking as fixed.