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 85558 - REGRESSION: IllegalArgumentException in refactoring when project refers to an external folder
Summary: REGRESSION: IllegalArgumentException in refactoring when project refers to an...
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Nam Nguyen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-22 14:13 UTC by Andrei Chistiakov
Modified: 2006-10-03 01:49 UTC (History)
3 users (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 Andrei Chistiakov 2006-09-22 14:13:38 UTC
Reproduced in build 060921_1 (JDK 1.6 Beta 2).

This is a regression since build 060910.

To reproduce the bug:
- create a new Java App project 'App';
- customize the project by adding an external folder (a folder existing outside
 the 'App' folder) to the list of Source Package Folders in the project's
properties;
- in Projects tree add a new xml schema under 'Source Packages' node;
- add a new complex type into the schema;
- refactor/rename the complex type.

java.lang.IllegalArgumentException
	at
org.netbeans.spi.project.support.GenericSources$Group.contains(GenericSources.java:137)
	at
org.netbeans.modules.xml.refactoring.FindUsageResult.getSourceGroup(FindUsageResult.java:145)
	at
org.netbeans.modules.xml.refactoring.FindUsageResult.doSearch(FindUsageResult.java:122)
	at
org.netbeans.modules.xml.refactoring.FindUsageResult.get(FindUsageResult.java:108)
	at
org.netbeans.modules.xml.refactoring.ui.j.spi.ui.ParametersPanel$6.run(ParametersPanel.java:357)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
Comment 1 Nam Nguyen 2006-09-22 16:02:29 UTC
IMO, SourceGroups.contains should not throw exception and just return false.
Anyway, we can get around this case.
Comment 2 Nam Nguyen 2006-09-22 16:12:08 UTC
Fix by do the checking ourselves before delegate to SourceGroup.contains.

/cvs/xml/refactoring/src/org/netbeans/modules/xml/refactoring/Attic/FindUsageResult.java,v
 <--  FindUsageResult.java
new revision: 1.1.2.11; previous revision: 1.1.2.10
Comment 3 Andrei Chistiakov 2006-09-25 15:44:41 UTC
Verified in build 060922.