Commits

musachy  committed cb83659

Add a protocols parameter to ClassFinder constructor, so other protocols beside "jar" can be used

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@1925e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits 944526f

Comments (0)

Files changed (1)

File src/java/com/opensymphony/xwork2/util/finder/ClassFinder.java

     }
 
     public ClassFinder(ClassLoader classLoader, Collection<URL> urls, boolean extractBaseInterfaces) {
+        this(classLoader, urls, extractBaseInterfaces, new HashSet(){
+            {
+                add("jar");
+            }
+        });
+    }
+
+    public ClassFinder(ClassLoader classLoader, Collection<URL> urls, boolean extractBaseInterfaces, Set<String> protocols) {
         this.classLoader = classLoader;
         this.extractBaseInterfaces = extractBaseInterfaces;
 
         List<String> classNames = new ArrayList<String>();
         for (URL location : urls) {
             try {
-                if ("jar".equals(location.getProtocol())) {
+                if (protocols.contains(location.getProtocol())) {
                     classNames.addAll(jar(location));
                 } else if ("file".equals(location.getProtocol())) {
                     try {