mrglavas 2004/12/15 16:10:46 Modified: java/src/org/apache/xml/serialize ObjectFactory.java java/src/org/apache/html/dom ObjectFactory.java java/src/org/apache/xerces/xinclude ObjectFactory.java java/src/org/apache/xerces/parsers ObjectFactory.java java/src/org/apache/xerces/impl/dv ObjectFactory.java java/src/org/apache/xerces/dom ObjectFactory.java Log: Eliminating try/catch blocks which caught and rethrew the same SecurityException. Revision Changes Path 1.9 +6 -10 xml-xerces/java/src/org/apache/xml/serialize/ObjectFactory.java Index: ObjectFactory.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/ObjectFactory.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ObjectFactory.java 15 Aug 2004 21:22:16 -0000 1.8 +++ ObjectFactory.java 16 Dec 2004 00:10:42 -0000 1.9 @@ -356,15 +356,11 @@ //throw security exception if the calling thread is not allowed to access the package //restrict the access to package as speicified in java.security policy SecurityManager security = System.getSecurityManager(); - try{ - 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 ; + if (security != null) { + final int lastDot = className.lastIndexOf("."); + String packageName = className; + if (lastDot != -1) packageName = className.substring(0, lastDot); + security.checkPackageAccess(packageName); } Class providerClass; if (cl == null) { 1.10 +6 -10 xml-xerces/java/src/org/apache/html/dom/ObjectFactory.java Index: ObjectFactory.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/ObjectFactory.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ObjectFactory.java 5 Oct 2004 03:23:48 -0000 1.9 +++ ObjectFactory.java 16 Dec 2004 00:10:43 -0000 1.10 @@ -358,15 +358,11 @@ //throw security exception if the calling thread is not allowed to access the package //restrict the access to package as speicified in java.security policy SecurityManager security = System.getSecurityManager(); - try{ - 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 ; + if (security != null) { + final int lastDot = className.lastIndexOf("."); + String packageName = className; + if (lastDot != -1) packageName = className.substring(0, lastDot); + security.checkPackageAccess(packageName); } Class providerClass; if (cl == null) { 1.8 +6 -10 xml-xerces/java/src/org/apache/xerces/xinclude/ObjectFactory.java Index: ObjectFactory.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xinclude/ObjectFactory.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ObjectFactory.java 15 Aug 2004 21:22:15 -0000 1.7 +++ ObjectFactory.java 16 Dec 2004 00:10:43 -0000 1.8 @@ -356,15 +356,11 @@ //throw security exception if the calling thread is not allowed to access the package //restrict the access to package as speicified in java.security policy SecurityManager security = System.getSecurityManager(); - try{ - 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 ; + if (security != null) { + final int lastDot = className.lastIndexOf("."); + String packageName = className; + if (lastDot != -1) packageName = className.substring(0, lastDot); + security.checkPackageAccess(packageName); } Class providerClass; if (cl == null) { 1.9 +6 -10 xml-xerces/java/src/org/apache/xerces/parsers/ObjectFactory.java Index: ObjectFactory.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/ObjectFactory.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ObjectFactory.java 15 Aug 2004 21:22:15 -0000 1.8 +++ ObjectFactory.java 16 Dec 2004 00:10:44 -0000 1.9 @@ -356,15 +356,11 @@ //throw security exception if the calling thread is not allowed to access the package //restrict the access to package as speicified in java.security policy SecurityManager security = System.getSecurityManager(); - try{ - 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 ; + if (security != null) { + final int lastDot = className.lastIndexOf("."); + String packageName = className; + if (lastDot != -1) packageName = className.substring(0, lastDot); + security.checkPackageAccess(packageName); } Class providerClass; if (cl == null) { 1.10 +6 -10 xml-xerces/java/src/org/apache/xerces/impl/dv/ObjectFactory.java Index: ObjectFactory.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/ObjectFactory.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ObjectFactory.java 6 Oct 2004 14:56:50 -0000 1.9 +++ ObjectFactory.java 16 Dec 2004 00:10:44 -0000 1.10 @@ -358,15 +358,11 @@ //throw security exception if the calling thread is not allowed to access the package //restrict the access to package as speicified in java.security policy SecurityManager security = System.getSecurityManager(); - try{ - 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 ; + if (security != null) { + final int lastDot = className.lastIndexOf("."); + String packageName = className; + if (lastDot != -1) packageName = className.substring(0, lastDot); + security.checkPackageAccess(packageName); } Class providerClass; if (cl == null) { 1.10 +6 -10 xml-xerces/java/src/org/apache/xerces/dom/ObjectFactory.java Index: ObjectFactory.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/ObjectFactory.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ObjectFactory.java 5 Oct 2004 17:12:51 -0000 1.9 +++ ObjectFactory.java 16 Dec 2004 00:10:46 -0000 1.10 @@ -358,15 +358,11 @@ //throw security exception if the calling thread is not allowed to access the package //restrict the access to package as speicified in java.security policy SecurityManager security = System.getSecurityManager(); - try{ - 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 ; + if (security != null) { + final int lastDot = className.lastIndexOf("."); + String packageName = className; + if (lastDot != -1) packageName = className.substring(0, lastDot); + security.checkPackageAccess(packageName); } Class providerClass; if (cl == null) {
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]