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: [email protected]
For additional commands, e-mail: [email protected]