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:42:43 UTC

svn commit: r1225569 - /xerces/java/branches/xml-schema-1.1-dev/samples/xni/ObjectFactory.java

Author: mrglavas
Date: Thu Dec 29 15:42:43 2011
New Revision: 1225569

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

Modified:
    xerces/java/branches/xml-schema-1.1-dev/samples/xni/ObjectFactory.java

Modified: xerces/java/branches/xml-schema-1.1-dev/samples/xni/ObjectFactory.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/samples/xni/ObjectFactory.java?rev=1225569&r1=1225568&r2=1225569&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/samples/xni/ObjectFactory.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/samples/xni/ObjectFactory.java Thu Dec 29 15:42:43 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