Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 205522 - prExcludes causes IllegalArgumentExeption
Summary: prExcludes causes IllegalArgumentExeption
Status: CLOSED FIXED
Alias: None
Product: M2T
Classification: Modeling
Component: Xpand (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Arto Laurila CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-04 17:08 EDT by ekkehard gentz CLA
Modified: 2013-02-21 08:10 EST (History)
1 user (show)

See Also:


Attachments
Patch (12.01 KB, patch)
2008-01-21 16:40 EST, Karsten Thoms CLA
sven.efftinge: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ekkehard gentz CLA 2007-10-04 17:08:54 EDT
if you use this in your workflow:
<prExcludes value="*.xml, *.hbm"/>

without setting <prDefaultExcludes> to false, this will cause an exception:

INFO - Source scan started ...
ERROR - GlobbingFileFilter does not support stars in the middle (.svn*.xml,).
java.lang.IllegalArgumentException: GlobbingFileFilter does not support stars in the middle (.svn*.xml,).
	at org.openarchitectureware.xpand2.pr.util.GenericFileFilter$GlobbingFileFilter.accept(GenericFileFilter.java:123)
	at org.openarchitectureware.xpand2.pr.util.GenericFileFilter.accept(GenericFileFilter.java:73)
	at org.openarchitectureware.xpand2.pr.util.GenericFileFilter.accept(GenericFileFilter.java:64)
	at java.io.File.listFiles(File.java:1091)
	at org.openarchitectureware.xpand2.pr.util.FSIO.getAllFilesInternal(FSIO.java:37)
	at org.openarchitectureware.xpand2.pr.util.FSIO.getAllFiles(FSIO.java:149)
	at org.openarchitectureware.xpand2.pr.ProtectedRegionResolverImpl.init(ProtectedRegionResolverImpl.java:307)
	
workaround:
changing to <prExcludes value=", *.xml, *.hbm"/>
will fix it.

but it would be better to do this inside the code, because if you're setting <prDefaultExcludes> to false,
then <prExcludes value="*.xml, *.hbm"/> would be valid.

or the lite version: add the different ways to the documentation ;-)
Comment 1 Karsten Thoms CLA 2008-01-21 16:39:59 EST
Fixed in branch 4.2. Moving now to M2T for HEAD.
Comment 2 Karsten Thoms CLA 2008-01-21 16:40:55 EST
Created attachment 87450 [details]
Patch

Patch includes unit test
Comment 3 Karsten Thoms CLA 2008-01-23 16:57:06 EST
Fixed now in Head.
Comment 4 Nick Boldt CLA 2008-01-28 16:57:46 EST
Move to verified as per bug 206558.
Comment 5 Karsten Thoms CLA 2013-02-21 08:10:16 EST
Bug resolved before Xpand 1.2 release date => Closing