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

Summary: [Root Method Selector] Having the same packages in sources and libraries in one project can lead to weird simplified selections
Product: profiler Reporter: J Bachorik <yardus>
Component: BaseAssignee: J Bachorik <yardus>
Status: RESOLVED FIXED    
Severity: normal Keywords: PLAN
Priority: P3    
Version: 7.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

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