--- Dominique Devienne <[EMAIL PROTECTED]> wrote: > > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > > 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?
Could do it, sure. Shouldn't impact performance since the method should only get called during testing. > > 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 That's what I thought, but the test got: [junit] java.lang.IllegalAccessError: tried to access method org.apache.tools .ant.DirectoryScanner.getScannedDirs()Ljava/util/Set; from class org.apache.tools.ant.DirectoryScannerTest So I gave up & made it public. Does anyone know what (if anything) I did wrong? Thanks, Matt > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]