LUCENE-3919: Remove useless loop

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1310898 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2012-04-07 22:33:13 +00:00
parent bdaa79206d
commit 62890c8089
1 changed files with 1 additions and 6 deletions

View File

@ -276,16 +276,11 @@ public class TestRandomChains extends BaseTokenStreamTestCase {
} }
private static void getClassesForPackage(String pckgname, List<Class<?>> classes) throws Exception { private static void getClassesForPackage(String pckgname, List<Class<?>> classes) throws Exception {
final ArrayList<File> directories = new ArrayList<File>();
final ClassLoader cld = TestRandomChains.class.getClassLoader(); final ClassLoader cld = TestRandomChains.class.getClassLoader();
final String path = pckgname.replace('.', '/'); final String path = pckgname.replace('.', '/');
final Enumeration<URL> resources = cld.getResources(path); final Enumeration<URL> resources = cld.getResources(path);
while (resources.hasMoreElements()) { while (resources.hasMoreElements()) {
final File f = new File(resources.nextElement().toURI()); final File directory = new File(resources.nextElement().toURI());
directories.add(f);
}
for (File directory : directories) {
if (directory.exists()) { if (directory.exists()) {
String[] files = directory.list(); String[] files = directory.list();
for (String file : files) { for (String file : files) {