You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by jy...@apache.org on 2004/03/11 22:02:13 UTC
cvs commit: xml-xalan/java/src/org/apache/xpath/functions ObjectFactory.java
jycli 2004/03/11 13:02:13
Modified: java/src/org/apache/xalan/extensions ObjectFactory.java
java/src/org/apache/xalan/lib ObjectFactory.java
java/src/org/apache/xalan/lib/sql ObjectFactory.java
java/src/org/apache/xalan/xslt ObjectFactory.java
java/src/org/apache/xalan/xsltc/cmdline ObjectFactory.java
java/src/org/apache/xalan/xsltc/compiler ObjectFactory.java
java/src/org/apache/xalan/xsltc/compiler/util
ObjectFactory.java
java/src/org/apache/xalan/xsltc/dom ObjectFactory.java
java/src/org/apache/xalan/xsltc/runtime ObjectFactory.java
java/src/org/apache/xalan/xsltc/trax ObjectFactory.java
java/src/org/apache/xml/dtm ObjectFactory.java
java/src/org/apache/xml/dtm/ref ObjectFactory.java
java/src/org/apache/xml/serializer ObjectFactory.java
java/src/org/apache/xml/utils ObjectFactory.java
java/src/org/apache/xpath/compiler ObjectFactory.java
java/src/org/apache/xpath/functions ObjectFactory.java
Log:
Fix a bug in the findProviderClass method of ObjectFactory
classes. The argument of SecurityManager.checkPackageAccess should be a string
value of a package name, instead of a class name
Revision Changes Path
1.3 +8 -5 xml-xalan/java/src/org/apache/xalan/extensions/ObjectFactory.java
Index: ObjectFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/extensions/ObjectFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ObjectFactory.java 23 Feb 2004 10:29:34 -0000 1.2
+++ ObjectFactory.java 11 Mar 2004 21:02:11 -0000 1.3
@@ -461,9 +461,12 @@
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
try{
- if (security != null){
- security.checkPackageAccess(className);
- }
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
}catch(SecurityException e){
throw e;
}
1.3 +8 -5 xml-xalan/java/src/org/apache/xalan/lib/ObjectFactory.java
Index: ObjectFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/lib/ObjectFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ObjectFactory.java 23 Feb 2004 10:29:34 -0000 1.2
+++ ObjectFactory.java 11 Mar 2004 21:02:12 -0000 1.3
@@ -461,9 +461,12 @@
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
try{
- if (security != null){
- security.checkPackageAccess(className);
- }
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
}catch(SecurityException e){
throw e;
}
1.3 +8 -5 xml-xalan/java/src/org/apache/xalan/lib/sql/ObjectFactory.java
Index: ObjectFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/lib/sql/ObjectFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ObjectFactory.java 23 Feb 2004 10:29:35 -0000 1.2
+++ ObjectFactory.java 11 Mar 2004 21:02:12 -0000 1.3
@@ -461,9 +461,12 @@
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
try{
- if (security != null){
- security.checkPackageAccess(className);
- }
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
}catch(SecurityException e){
throw e;
}
1.3 +8 -5 xml-xalan/java/src/org/apache/xalan/xslt/ObjectFactory.java
Index: ObjectFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xslt/ObjectFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ObjectFactory.java 23 Feb 2004 10:29:35 -0000 1.2
+++ ObjectFactory.java 11 Mar 2004 21:02:12 -0000 1.3
@@ -461,9 +461,12 @@
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
try{
- if (security != null){
- security.checkPackageAccess(className);
- }
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
}catch(SecurityException e){
throw e;
}
1.3 +8 -5 xml-xalan/java/src/org/apache/xalan/xsltc/cmdline/ObjectFactory.java
Index: ObjectFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/cmdline/ObjectFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ObjectFactory.java 23 Feb 2004 10:29:35 -0000 1.2
+++ ObjectFactory.java 11 Mar 2004 21:02:12 -0000 1.3
@@ -461,9 +461,12 @@
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
try{
- if (security != null){
- security.checkPackageAccess(className);
- }
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
}catch(SecurityException e){
throw e;
}
1.3 +8 -5 xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ObjectFactory.java
Index: ObjectFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ObjectFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ObjectFactory.java 23 Feb 2004 10:29:35 -0000 1.2
+++ ObjectFactory.java 11 Mar 2004 21:02:12 -0000 1.3
@@ -461,9 +461,12 @@
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
try{
- if (security != null){
- security.checkPackageAccess(className);
- }
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
}catch(SecurityException e){
throw e;
}
1.3 +8 -5 xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/ObjectFactory.java
Index: ObjectFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/ObjectFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ObjectFactory.java 23 Feb 2004 10:29:35 -0000 1.2
+++ ObjectFactory.java 11 Mar 2004 21:02:12 -0000 1.3
@@ -461,9 +461,12 @@
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
try{
- if (security != null){
- security.checkPackageAccess(className);
- }
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
}catch(SecurityException e){
throw e;
}
1.3 +8 -5 xml-xalan/java/src/org/apache/xalan/xsltc/dom/ObjectFactory.java
Index: ObjectFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/ObjectFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ObjectFactory.java 23 Feb 2004 10:29:35 -0000 1.2
+++ ObjectFactory.java 11 Mar 2004 21:02:12 -0000 1.3
@@ -461,9 +461,12 @@
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
try{
- if (security != null){
- security.checkPackageAccess(className);
- }
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
}catch(SecurityException e){
throw e;
}
1.2 +8 -5 xml-xalan/java/src/org/apache/xalan/xsltc/runtime/ObjectFactory.java
Index: ObjectFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/ObjectFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ObjectFactory.java 23 Feb 2004 17:29:35 -0000 1.1
+++ ObjectFactory.java 11 Mar 2004 21:02:12 -0000 1.2
@@ -461,9 +461,12 @@
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
try{
- if (security != null){
- security.checkPackageAccess(className);
- }
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
}catch(SecurityException e){
throw e;
}
1.3 +8 -5 xml-xalan/java/src/org/apache/xalan/xsltc/trax/ObjectFactory.java
Index: ObjectFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/ObjectFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ObjectFactory.java 23 Feb 2004 10:29:36 -0000 1.2
+++ ObjectFactory.java 11 Mar 2004 21:02:12 -0000 1.3
@@ -461,9 +461,12 @@
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
try{
- if (security != null){
- security.checkPackageAccess(className);
- }
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
}catch(SecurityException e){
throw e;
}
1.3 +8 -5 xml-xalan/java/src/org/apache/xml/dtm/ObjectFactory.java
Index: ObjectFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ObjectFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ObjectFactory.java 23 Feb 2004 10:29:36 -0000 1.2
+++ ObjectFactory.java 11 Mar 2004 21:02:13 -0000 1.3
@@ -461,9 +461,12 @@
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
try{
- if (security != null){
- security.checkPackageAccess(className);
- }
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
}catch(SecurityException e){
throw e;
}
1.3 +8 -5 xml-xalan/java/src/org/apache/xml/dtm/ref/ObjectFactory.java
Index: ObjectFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/ObjectFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ObjectFactory.java 23 Feb 2004 10:29:36 -0000 1.2
+++ ObjectFactory.java 11 Mar 2004 21:02:13 -0000 1.3
@@ -461,9 +461,12 @@
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
try{
- if (security != null){
- security.checkPackageAccess(className);
- }
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
}catch(SecurityException e){
throw e;
}
1.3 +8 -5 xml-xalan/java/src/org/apache/xml/serializer/ObjectFactory.java
Index: ObjectFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/serializer/ObjectFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ObjectFactory.java 23 Feb 2004 10:29:37 -0000 1.2
+++ ObjectFactory.java 11 Mar 2004 21:02:13 -0000 1.3
@@ -461,9 +461,12 @@
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
try{
- if (security != null){
- security.checkPackageAccess(className);
- }
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
}catch(SecurityException e){
throw e;
}
1.7 +6 -3 xml-xalan/java/src/org/apache/xml/utils/ObjectFactory.java
Index: ObjectFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/utils/ObjectFactory.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ObjectFactory.java 23 Feb 2004 10:29:37 -0000 1.6
+++ ObjectFactory.java 11 Mar 2004 21:02:13 -0000 1.7
@@ -461,9 +461,12 @@
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
try{
- if (security != null){
- security.checkPackageAccess(className);
- }
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
}catch(SecurityException e){
throw e;
}
1.3 +8 -5 xml-xalan/java/src/org/apache/xpath/compiler/ObjectFactory.java
Index: ObjectFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/compiler/ObjectFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ObjectFactory.java 23 Feb 2004 10:29:37 -0000 1.2
+++ ObjectFactory.java 11 Mar 2004 21:02:13 -0000 1.3
@@ -461,9 +461,12 @@
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
try{
- if (security != null){
- security.checkPackageAccess(className);
- }
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
}catch(SecurityException e){
throw e;
}
1.3 +8 -5 xml-xalan/java/src/org/apache/xpath/functions/ObjectFactory.java
Index: ObjectFactory.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/ObjectFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ObjectFactory.java 23 Feb 2004 10:29:37 -0000 1.2
+++ ObjectFactory.java 11 Mar 2004 21:02:13 -0000 1.3
@@ -461,9 +461,12 @@
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
try{
- if (security != null){
- security.checkPackageAccess(className);
- }
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
}catch(SecurityException e){
throw e;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org