ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java
Date Mon, 07 Mar 2005 14:49:28 GMT
> From: mbenson@apache.org [mailto:mbenson@apache.org]
>   By popular demand:  Do not scan directories if their contents are
>   excluded. Changed scannedDirs from a cache to a result and added
>   a gettor method with a warning in the Javadoc that it was a testing
>   method only.


Cool! Should be a boon to some builds. Thanks Matt.
 
>        /**
>   +     * This method is of interest for testing purposes.  The
returned
>   +     * Set is live and should not be modified.
>   +     * @return the Set of relative directory names that have been
>   +     * scanned.
>   +     */
>   +    public Set getScannedDirs() {
>   +        return scannedDirs;
>   +    }

How about returning Collections.unmodifiableSet(scannedDirs)
instead just to be on the safe side?

Or better yet, make getScannedDirs() package private, since
DirectoryScannerTest can still access it since in the same
package no? (albeit in a different directory.) --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message