You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-cvs@xml.apache.org by mr...@apache.org on 2007/03/25 22:03:28 UTC
svn commit: r522337 - in /xml/commons/trunk/java/external/src/javax/xml:
validation/SecuritySupport.java xpath/SecuritySupport.java
Author: mrglavas
Date: Sun Mar 25 13:03:27 2007
New Revision: 522337
URL: http://svn.apache.org/viewvc?view=rev&rev=522337
Log:
Fixing Bugzilla #41931:
http://issues.apache.org/bugzilla/show_bug.cgi?id=41931
The SecuritySupport in javax.xml.validation and javax.xml.xpath are calling the
static getSystem* methods on the ClassLoader objects for retrieving resources. They
should be calling getResource() and getResources() so that they find all the
META-INF/services which are visible to the given ClassLoader.
Modified:
xml/commons/trunk/java/external/src/javax/xml/validation/SecuritySupport.java
xml/commons/trunk/java/external/src/javax/xml/xpath/SecuritySupport.java
Modified: xml/commons/trunk/java/external/src/javax/xml/validation/SecuritySupport.java
URL: http://svn.apache.org/viewvc/xml/commons/trunk/java/external/src/javax/xml/validation/SecuritySupport.java?view=diff&rev=522337&r1=522336&r2=522337
==============================================================================
--- xml/commons/trunk/java/external/src/javax/xml/validation/SecuritySupport.java (original)
+++ xml/commons/trunk/java/external/src/javax/xml/validation/SecuritySupport.java Sun Mar 25 13:03:27 2007
@@ -102,8 +102,9 @@
URL url;
if (cl == null) {
url = ClassLoader.getSystemResource(name);
- } else {
- url = cl.getSystemResource(name);
+ }
+ else {
+ url = cl.getResource(name);
}
return url;
}
@@ -120,8 +121,9 @@
Enumeration enumeration;
if (cl == null) {
enumeration = ClassLoader.getSystemResources(name);
- } else {
- enumeration = cl.getSystemResources(name);
+ }
+ else {
+ enumeration = cl.getResources(name);
}
return enumeration;
}
Modified: xml/commons/trunk/java/external/src/javax/xml/xpath/SecuritySupport.java
URL: http://svn.apache.org/viewvc/xml/commons/trunk/java/external/src/javax/xml/xpath/SecuritySupport.java?view=diff&rev=522337&r1=522336&r2=522337
==============================================================================
--- xml/commons/trunk/java/external/src/javax/xml/xpath/SecuritySupport.java (original)
+++ xml/commons/trunk/java/external/src/javax/xml/xpath/SecuritySupport.java Sun Mar 25 13:03:27 2007
@@ -102,8 +102,9 @@
URL url;
if (cl == null) {
url = ClassLoader.getSystemResource(name);
- } else {
- url = cl.getSystemResource(name);
+ }
+ else {
+ url = cl.getResource(name);
}
return url;
}
@@ -120,8 +121,9 @@
Enumeration enumeration;
if (cl == null) {
enumeration = ClassLoader.getSystemResources(name);
- } else {
- enumeration = cl.getSystemResources(name);
+ }
+ else {
+ enumeration = cl.getResources(name);
}
return enumeration;
}