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 206680 - IAE: Zero or multiple asterisks in .../Ai2a*/build/generated-sources/ap-source-output/*.java
Summary: IAE: Zero or multiple asterisks in .../Ai2a*/build/generated-sources/ap-sourc...
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.1
Hardware: All All
: P4 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-23 21:19 UTC by michbarsinai
Modified: 2015-02-04 03:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 184002


Attachments
stacktrace (3.14 KB, text/plain)
2011-12-23 21:19 UTC, michbarsinai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description michbarsinai 2011-12-23 21:19:37 UTC
Build: NetBeans IDE 7.1 RC2 (Build 201111302200)
VM: Java HotSpot(TM) Client VM, 20.4-b02-402, Java(TM) SE Runtime Environment, 1.6.0_29-b11-402-10M3527
OS: Mac OS X

User Comments:
michbarsinai: Opened a node of a project. There are 2 project open, with the same name.




Stacktrace: 
java.lang.IllegalArgumentException: Zero or multiple asterisks in /Users/michaelbar-sinai/Documents/Msc/Semesters/2011a/Intro to AI/Ai2a*/build/generated-sources/ap-source-output/*.java
   at org.netbeans.spi.project.support.ant.GlobFileBuiltQuery.<init>(GlobFileBuiltQuery.java:110)
   at org.netbeans.spi.project.support.ant.AntProjectHelper.createGlobFileBuiltQuery(AntProjectHelper.java:1073)
   at org.netbeans.modules.java.api.common.queries.FileBuiltQueryImpl.createDelegate(FileBuiltQueryImpl.java:152)
   at org.netbeans.modules.java.api.common.queries.FileBuiltQueryImpl.getStatusImpl(FileBuiltQueryImpl.java:115)
   at org.netbeans.modules.java.api.common.queries.FileBuiltQueryImpl.access$100(FileBuiltQueryImpl.java:70)
   at org.netbeans.modules.java.api.common.queries.FileBuiltQueryImpl$2.run(FileBuiltQueryImpl.java:108)
Comment 1 michbarsinai 2011-12-23 21:19:39 UTC
Created attachment 114440 [details]
stacktrace
Comment 2 Jesse Glick 2011-12-27 17:58:47 UTC
java.api.common.queries.FileBuiltQueryImpl.createDelegate uses root + "/*.java" which is dangerous; should probably use "${build.generated.sources.dir}/" + root.getName() + "/*.java" instead. Ought to be easy enough to check in a unit test.

Workaround: do not include metacharacters such as asterisk (*) in project names, since this is bound to confuse Ant scripts in general.
Comment 3 Jesse Glick 2011-12-27 17:59:46 UTC
Sorry, not an API issue. (I was originally thinking that createGlobFileBuiltQuery would have to be changed to permit multiple asterisks, ignoring all but the last, but this now seems unnecessary.)
Comment 4 Quality Engineering 2015-02-04 03:29:27 UTC
Reported for 7.3.x or earlier, no new info since then -> closing as worksforme, please reopen in case you see it.