mrglavas 2004/12/15 16:11:34 Modified: java/samples/xni ObjectFactory.java Log: Eliminating try/catch blocks which caught and rethrew the same SecurityException. Revision Changes Path 1.7 +6 -10 xml-xerces/java/samples/xni/ObjectFactory.java Index: ObjectFactory.java =================================================================== RCS file: /home/cvs/xml-xerces/java/samples/xni/ObjectFactory.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ObjectFactory.java 6 Jun 2004 23:33:40 -0000 1.6 +++ ObjectFactory.java 16 Dec 2004 00:11:34 -0000 1.7 @@ -359,15 +359,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]