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 204829 - [Root Method Selector] Having the same packages in sources and libraries in one project can lead to weird simplified selections
Summary: [Root Method Selector] Having the same packages in sources and libraries in o...
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: J Bachorik
URL:
Keywords: PLAN
Depends on:
Blocks:
 
Reported: 2011-11-08 12:57 UTC by J Bachorik
Modified: 2012-01-26 14:44 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 J Bachorik 2011-11-08 12:57:15 UTC
When sharing the same packages between sources and libraries in a project (eg. "com" package in AnagramGame) the selection simplifying algorithm might set the "com" package in libraries as selected even though the user didn't make such a choice. This is the result of not being able to distinguish between a profiling root definition for "com.**" coming from sources and the one coming from libraries - in fact on the level of profiling roots there is no such distinction.

An easy to reproduce scenario is:
1. Open AnagramGame sample project
2. Profile the AnagramGame project
3. Select CPU profiling (Analyze Performance/Profile application)
4. Edit profiling roots
5. Open "Libraries" node
6. Click the checkbox next to "java" label twice
7. The "com" package will get selected automatically
Comment 1 J Bachorik 2012-01-26 14:44:52 UTC
Since it is impossible to distinguish between a package signature coming from sources and the one coming from libraries there is no easy way to fix this problem completely.

However, flattening the packages makes it much more difficult to select generic packages like "com.*" by accident. This should suffice for the most of the cases.


http://hg.netbeans.org/profiler-main/rev/5723ccc0b8e1