cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject svn commit: r156419 - cocoon/trunk/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/JavaLanguage.java
Date Mon, 07 Mar 2005 12:32:28 GMT
Author: sylvain
Date: Mon Mar  7 04:32:28 2005
New Revision: 156419

URL: http://svn.apache.org/viewcvs?view=rev&rev=156419
Log:
Antonio still has the now removed JavaArchiveFilter in his class directory!

Modified:
    cocoon/trunk/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/JavaLanguage.java

Modified: cocoon/trunk/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/JavaLanguage.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/JavaLanguage.java?view=diff&r1=156418&r2=156419
==============================================================================
--- cocoon/trunk/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/JavaLanguage.java
(original)
+++ cocoon/trunk/src/blocks/xsp/java/org/apache/cocoon/components/language/programming/java/JavaLanguage.java
Mon Mar  7 04:32:28 2005
@@ -16,6 +16,7 @@
 package org.apache.cocoon.components.language.programming.java;
 
 import java.io.File;
+import java.io.FileFilter;
 import java.io.IOException;
 import java.util.List;
 import java.util.StringTokenizer;
@@ -37,7 +38,6 @@
 import org.apache.cocoon.components.language.programming.CompilerError;
 import org.apache.cocoon.components.language.programming.LanguageCompiler;
 import org.apache.cocoon.util.ClassUtils;
-import org.apache.cocoon.util.JavaArchiveFilter;
 import org.apache.commons.lang.SystemUtils;
 
 /**
@@ -287,7 +287,13 @@
                     getLogger().warn("Attempted to retrieve directory listing of non-directory
" + dir.toString());
                 }
             } else {
-                File[] files = dir.listFiles(new JavaArchiveFilter());
+                File[] files = dir.listFiles(new FileFilter() {
+                    public boolean accept(File file) {
+                        String name = file.getName().toLowerCase();
+	                return (name.endsWith(".jar") || name.endsWith(".zip"));
+		    }
+
+		});
                 for (int i = 0; i < files.length; i++) {
                     buffer.append(files[i]).append(File.pathSeparator);
                 }



Mime
View raw message