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 2006/09/10 02:24:53 UTC
svn commit: r441882 -
/xerces/java/trunk/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java
Author: mrglavas
Date: Sat Sep 9 17:24:52 2006
New Revision: 441882
URL: http://svn.apache.org/viewvc?view=rev&rev=441882
Log:
JIRA Issue #1184:
http://issues.apache.org/jira/browse/XERCESJ-1184
Eliminating an unnecessary array allocation. Patch thanks to Dave Brosius.
Modified:
xerces/java/trunk/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java
Modified: xerces/java/trunk/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java?view=diff&rev=441882&r1=441881&r2=441882
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java Sat Sep 9 17:24:52 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2005 The Apache Software Foundation.
+ * Copyright 1999-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1852,13 +1852,12 @@
} // init()
/** ensure element stack capacity */
- private void ensureStackCapacity ( int newElementDepth) {
+ private void ensureStackCapacity (int newElementDepth) {
if (newElementDepth == fElementQNamePartsStack.length) {
- int[] newStack = new int[newElementDepth * 2];
QName[] newStackOfQueue = new QName[newElementDepth * 2];
System.arraycopy(this.fElementQNamePartsStack, 0, newStackOfQueue, 0, newElementDepth );
- fElementQNamePartsStack = newStackOfQueue;
+ fElementQNamePartsStack = newStackOfQueue;
QName qname = fElementQNamePartsStack[newElementDepth];
if (qname == null) {
@@ -1867,7 +1866,7 @@
}
}
- newStack = new int[newElementDepth * 2];
+ int[] newStack = new int[newElementDepth * 2];
System.arraycopy(fElementIndexStack, 0, newStack, 0, newElementDepth);
fElementIndexStack = newStack;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org