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 2010/10/26 03:39:45 UTC
svn commit: r1027336 -
/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/BaseSchemaFactory.java
Author: mrglavas
Date: Tue Oct 26 01:39:45 2010
New Revision: 1027336
URL: http://svn.apache.org/viewvc?rev=1027336&view=rev
Log:
Reducing the number of array accesses in newSchema(Source[]).
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/BaseSchemaFactory.java
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/BaseSchemaFactory.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/BaseSchemaFactory.java?rev=1027336&r1=1027335&r2=1027336&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/BaseSchemaFactory.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/BaseSchemaFactory.java Tue Oct 26 01:39:45 2010
@@ -170,7 +170,7 @@ abstract class BaseSchemaFactory extends
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;
@@ -178,9 +178,10 @@ abstract class BaseSchemaFactory extends
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