You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2011/12/29 16:41:47 UTC

svn commit: r1225567 - /xerces/java/trunk/samples/xni/ObjectFactory.java

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: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org