Bug 199458 - Projects libraries are broken due to OpenProjects.getOpenProjects() returning FeatureProjectFactory$FeatureNonProject
Projects libraries are broken due to OpenProjects.getOpenProjects() returning...
Status: RESOLVED FIXED
Product: projects
Classification: Unclassified
Component: Ant
7.1
PC Mac OS X
: P3 (vote)
: 7.1
Assigned To: Tomas Zezula
issues@projects
: ERGONOMICS
Depends on:
Blocks:
  Show dependency treegraph
 
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
:


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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo