Author: mrglavas
Date: Thu Dec 29 15:41:47 2011
New Revision: 1225567

URL: http://svn.apache.org/viewvc?rev=1225567&view=rev
Log:
Minor performance improvement. Use String.lastIndexOf(int) instead of 
String.lastIndexOf(String).

Modified:
    xerces/java/trunk/samples/xni/ObjectFactory.java

Modified: xerces/java/trunk/samples/xni/ObjectFactory.java
URL: 
http://svn.apache.org/viewvc/xerces/java/trunk/samples/xni/ObjectFactory.java?rev=1225567&r1=1225566&r2=1225567&view=diff
==============================================================================
--- xerces/java/trunk/samples/xni/ObjectFactory.java (original)
+++ xerces/java/trunk/samples/xni/ObjectFactory.java Thu Dec 29 15:41:47 2011
@@ -368,7 +368,7 @@ final class ObjectFactory {
         //restrict the access to package as speicified in java.security policy
         SecurityManager security = System.getSecurityManager();
         if (security != null) {
-            final int lastDot = className.lastIndexOf(".");
+            final int lastDot = className.lastIndexOf('.');
             String packageName = className;
             if (lastDot != -1) packageName = className.substring(0, lastDot);
             security.checkPackageAccess(packageName);



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to