commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1090690 - in /commons/proper/discovery/trunk: RELEASE-NOTES.txt src/changes/changes.xml src/java/org/apache/commons/discovery/resource/classes/DiscoverClasses.java
Date Sat, 09 Apr 2011 21:13:18 GMT
Author: simonetripodi
Date: Sat Apr  9 21:13:17 2011
New Revision: 1090690

URL: http://svn.apache.org/viewvc?rev=1090690&view=rev
Log:
DISCOVERY-6: [discovery] Doesn't work with ClassLoaders that do not support getResource()

Modified:
    commons/proper/discovery/trunk/RELEASE-NOTES.txt
    commons/proper/discovery/trunk/src/changes/changes.xml
    commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/classes/DiscoverClasses.java

Modified: commons/proper/discovery/trunk/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/commons/proper/discovery/trunk/RELEASE-NOTES.txt?rev=1090690&r1=1090689&r2=1090690&view=diff
==============================================================================
--- commons/proper/discovery/trunk/RELEASE-NOTES.txt (original)
+++ commons/proper/discovery/trunk/RELEASE-NOTES.txt Sat Apr  9 21:13:17 2011
@@ -35,6 +35,7 @@ BUGS FROM PREVIOUS RELEASE
 JIRA Issues Addressed
 ---------------------
 * DISCOVERY-3 (https://issues.apache.org/jira/browse/DISCOVERY-3)
+* DISCOVERY-6 (https://issues.apache.org/jira/browse/DISCOVERY-6)
 * DISCOVERY-7 (https://issues.apache.org/jira/browse/DISCOVERY-7)
 * DISCOVERY-9 (https://issues.apache.org/jira/browse/DISCOVERY-9)
 * DISCOVERY-11 (https://issues.apache.org/jira/browse/DISCOVERY-11)

Modified: commons/proper/discovery/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/discovery/trunk/src/changes/changes.xml?rev=1090690&r1=1090689&r2=1090690&view=diff
==============================================================================
--- commons/proper/discovery/trunk/src/changes/changes.xml (original)
+++ commons/proper/discovery/trunk/src/changes/changes.xml Sat Apr  9 21:13:17 2011
@@ -26,6 +26,9 @@
     <action dev="simonetripodi" type="fix" issue="DISCOVERY-3">
       Enumeration in Service class is broken.
     </action>
+    <action dev="simonetripodi" type="fix" issue="DISCOVERY-6">
+      [discovery] Doesn't work with ClassLoaders that do not support getResource()
+    </action>
     <action dev="simonetripodi" type="update" issue="DISCOVERY-7">
       Discovery failed to load an inner class.
     </action>

Modified: commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/classes/DiscoverClasses.java
URL: http://svn.apache.org/viewvc/commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/classes/DiscoverClasses.java?rev=1090690&r1=1090689&r2=1090690&view=diff
==============================================================================
--- commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/classes/DiscoverClasses.java
(original)
+++ commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/classes/DiscoverClasses.java
Sat Apr  9 21:13:17 2011
@@ -102,7 +102,10 @@ public class DiscoverClasses<T> extends 
                         url = loader.getResource(resourceName);
                     } catch (UnsupportedOperationException e) {
                         try {
-                            url = loader.loadClass(className).getProtectionDomain().getCodeSource().getLocation();
+                            url = new URL(loader.loadClass(className)
+                                    .getProtectionDomain()
+                                    .getCodeSource()
+                                    .getLocation(), resourceName);
                         } catch (Exception le) {
                             // keep url null
                         }



Mime
View raw message