xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mrgla...@apache.org
Subject svn commit: r1027335 - /xerces/java/trunk/src/org/apache/xerces/jaxp/validation/XMLSchemaFactory.java
Date Tue, 26 Oct 2010 01:37:39 GMT
Author: mrglavas
Date: Tue Oct 26 01:37:38 2010
New Revision: 1027335

URL: http://svn.apache.org/viewvc?rev=1027335&view=rev
Log:
Reducing the number of array accesses in newSchema(Source[]).

Modified:
    xerces/java/trunk/src/org/apache/xerces/jaxp/validation/XMLSchemaFactory.java

Modified: xerces/java/trunk/src/org/apache/xerces/jaxp/validation/XMLSchemaFactory.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/jaxp/validation/XMLSchemaFactory.java?rev=1027335&r1=1027334&r2=1027335&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/jaxp/validation/XMLSchemaFactory.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/jaxp/validation/XMLSchemaFactory.java Tue Oct
26 01:37:38 2010
@@ -180,7 +180,7 @@ public final class XMLSchemaFactory exte
         XMLInputSource[] xmlInputSources = new XMLInputSource[schemas.length];
         InputStream inputStream;
         Reader reader;
-        for( int i=0; i<schemas.length; i++ ) {
+        for (int i = 0; i < schemas.length; ++i) {
             Source source = schemas[i];
             if (source instanceof StreamSource) {
                 StreamSource streamSource = (StreamSource) source;
@@ -188,9 +188,10 @@ public final class XMLSchemaFactory exte
                 String systemId = streamSource.getSystemId();
                 inputStream = streamSource.getInputStream();
                 reader = streamSource.getReader();
-                xmlInputSources[i] = new XMLInputSource(publicId, systemId, null);
-                xmlInputSources[i].setByteStream(inputStream);
-                xmlInputSources[i].setCharacterStream(reader);
+                XMLInputSource xmlInputSource = new XMLInputSource(publicId, systemId, null);
+                xmlInputSource.setByteStream(inputStream);
+                xmlInputSource.setCharacterStream(reader);               
+                xmlInputSources[i] = xmlInputSource;
             }
             else if (source instanceof SAXSource) {
                 SAXSource saxSource = (SAXSource) source;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org


Mime
View raw message