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 199458 - Projects libraries are broken due to OpenProjects.getOpenProjects() returning FeatureProjectFactory$FeatureNonProject
Summary: Projects libraries are broken due to OpenProjects.getOpenProjects() returning...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 7.1
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords: ERGONOMICS
Depends on:
Blocks:
 
Reported: 2011-06-16 11:30 UTC by Tomas Zezula
Modified: 2011-06-17 14:40 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 Zezula 2011-06-16 11:30:15 UTC
Already reported before on the project.libraries, but no way how to reproduce so I've added only logging.
Now I've got to the same situation while running under debugger.
So here is a description:
When creating a new per project library an AE is thrown: Creating library in unknown area: ProjectLibraryArea[/Users/tom/NetBeansProjects/JavaApplication1/lib/nblibraries.properties] known areas: [] created: [] known areas after reinit: [] providers: [ProjectLibraryProvider]

The reason is that the ProjectLibraryProvider.getOpenAreas() asks the OpenProjects.getOpenProjects() for list of projects and the then it tries to get the APH by calling AntBasedProjectFactorySingleton.getHelperFor(p). The AntBasedProjectFactorySingleton.getHelperFor just lookups the APH in WeakHashMap<Project,Reference<APH>>.
While the map is OK and contains mapping J2SEProject to APH the OpenProjects returned no J2SEProject but  FeatureProjectFactory$FeatureNonProject which does not equal to J2SEProject, so no APH is returned.
Also the OpenProjects.getDefault().openProjects().isDone() returns true.
Comment 1 Tomas Zezula 2011-06-16 11:33:55 UTC
Fixed jet-main e80b7588f062
Comment 2 Quality Engineering 2011-06-17 14:40:47 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/e80b7588f062
User: Tomas Zezula <tzezula@netbeans.org>
Log: #199458:Projects libraries are broken due to OpenProjects.getOpenProjects() returning FeatureProjectFactory$FeatureNonProject