mrglavas 2005/03/07 15:25:34 Modified: java/src/org/apache/xerces/dom RangeImpl.java NamedNodeMapImpl.java DeferredDocumentImpl.java CoreDocumentImpl.java java/src/org/apache/xerces/impl/dtd XMLDTDProcessor.java DTDGrammar.java java/src/org/apache/xerces/impl/xs XMLSchemaLoader.java java/src/org/apache/xerces/impl/xpath XPath.java Log: JIRA Issue #1045: http://issues.apache.org/jira/browse/XERCESJ-1045 Cleaning up superfluous code. Patch thanks to Dave Brosius. Revision Changes Path 1.38 +1 -3 xml-xerces/java/src/org/apache/xerces/dom/RangeImpl.java Index: RangeImpl.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/RangeImpl.java,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- RangeImpl.java 4 Nov 2004 21:53:30 -0000 1.37 +++ RangeImpl.java 7 Mar 2005 23:25:34 -0000 1.38 @@ -733,8 +733,6 @@ } } - Node root = getCommonAncestorContainer(); - Node realStart = fStartContainer; Node realEnd = fEndContainer; if (fStartContainer.getNodeType() == Node.TEXT_NODE) { 1.39 +6 -7 xml-xerces/java/src/org/apache/xerces/dom/NamedNodeMapImpl.java Index: NamedNodeMapImpl.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/NamedNodeMapImpl.java,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- NamedNodeMapImpl.java 4 Nov 2004 21:40:35 -0000 1.38 +++ NamedNodeMapImpl.java 7 Mar 2005 23:25:34 -0000 1.39 @@ -537,18 +537,17 @@ protected int addItem (Node arg) { int i = findNamePoint(arg.getNamespaceURI(), arg.getLocalName()); - NodeImpl previous = null; if (i >= 0) { - previous = (NodeImpl) nodes.elementAt(i); nodes.setElementAt(arg,i); - } else { + } + else { // If we can't find by namespaceURI, localName, then we find by // nodeName so we know where to insert. i = findNamePoint(arg.getNodeName(),0); - if (i >=0) { - previous = (NodeImpl) nodes.elementAt(i); + if (i >= 0) { nodes.insertElementAt(arg,i); - } else { + } + else { i = -1 - i; // Insert point (may be end of list) if (null == nodes) { nodes = new Vector(5, 10); 1.57 +1 -6 xml-xerces/java/src/org/apache/xerces/dom/DeferredDocumentImpl.java Index: DeferredDocumentImpl.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/DeferredDocumentImpl.java,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- DeferredDocumentImpl.java 5 Oct 2004 17:12:51 -0000 1.56 +++ DeferredDocumentImpl.java 7 Mar 2005 23:25:34 -0000 1.57 @@ -474,8 +474,6 @@ int lastAttrNodeIndex = getChunkIndex(fNodeExtra, elementChunk, elementIndex); if (lastAttrNodeIndex != 0) { - int lastAttrChunk = lastAttrNodeIndex >> CHUNK_SHIFT; - int lastAttrIndex = lastAttrNodeIndex & CHUNK_MASK; // add link from new attribute to last attribute setChunkIndex(fNodePrevSib, lastAttrNodeIndex, attrChunk, attrIndex); @@ -759,11 +757,8 @@ /** Sets the last child of the parentIndex to childIndex. */ public void setAsLastChild(int parentIndex, int childIndex) { - int pchunk = parentIndex >> CHUNK_SHIFT; int pindex = parentIndex & CHUNK_MASK; - int chunk = childIndex >> CHUNK_SHIFT; - int index = childIndex & CHUNK_MASK; setChunkIndex(fNodeLastChild, childIndex, pchunk, pindex); } // setAsLastChild(int,int) 1.83 +1 -2 xml-xerces/java/src/org/apache/xerces/dom/CoreDocumentImpl.java Index: CoreDocumentImpl.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/CoreDocumentImpl.java,v retrieving revision 1.82 retrieving revision 1.83 diff -u -r1.82 -r1.83 --- CoreDocumentImpl.java 4 Nov 2004 20:51:27 -0000 1.82 +++ CoreDocumentImpl.java 7 Mar 2005 23:25:34 -0000 1.83 @@ -1824,7 +1824,6 @@ if (entityNode == null) { break; } - EntityImpl entity = (EntityImpl) entityNode; for (child = entityNode.getFirstChild(); child != null; child = child.getNextSibling()) { Node childClone = child.cloneNode(true); 1.14 +1 -3 xml-xerces/java/src/org/apache/xerces/impl/dtd/XMLDTDProcessor.java Index: XMLDTDProcessor.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dtd/XMLDTDProcessor.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- XMLDTDProcessor.java 4 Oct 2004 21:57:30 -0000 1.13 +++ XMLDTDProcessor.java 7 Mar 2005 23:25:34 -0000 1.14 @@ -1608,8 +1608,6 @@ */ private boolean normalizeDefaultAttrValue(XMLString value) { - int oldLength = value.length; - boolean skipSpace = true; // skip leading spaces int current = value.offset; int end = value.offset + value.length; 1.31 +1 -10 xml-xerces/java/src/org/apache/xerces/impl/dtd/DTDGrammar.java Index: DTDGrammar.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dtd/DTDGrammar.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- DTDGrammar.java 4 Oct 2004 21:57:30 -0000 1.30 +++ DTDGrammar.java 7 Mar 2005 23:25:34 -0000 1.31 @@ -1338,7 +1338,6 @@ */ public boolean isCDATAAttribute(QName elName, QName atName) { int elDeclIdx = getElementDeclIndex(elName); - int atDeclIdx = getAttributeDeclIndex(elDeclIdx, atName.rawname); if (getAttributeDecl(elDeclIdx, fAttributeDecl) && fAttributeDecl.simpleType.type != XMLSimpleType.TYPE_CDATA){ return false; @@ -1736,15 +1735,11 @@ int chunk = elementDeclIndex >> CHUNK_SHIFT; int index = elementDeclIndex & CHUNK_MASK; - int scope = elementDecl.scope; - - fElementDeclName[chunk][index].setValues(elementDecl.name); fElementDeclType[chunk][index] = elementDecl.type; fElementDeclContentModelValidator[chunk][index] = elementDecl.contentModelValidator; - if (elementDecl.simpleType.list == true ) { fElementDeclType[chunk][index] |= LIST_FLAG; } @@ -1891,13 +1886,9 @@ fEntityIndexMap.put(entityDecl.name, entityDeclIndex); } - protected int createNotationDecl() { int chunk = fNotationCount >> CHUNK_SHIFT; - int index = fNotationCount & CHUNK_MASK; - ensureNotationDeclCapacity(chunk); - return fNotationCount++; } 1.39 +1 -2 xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaLoader.java Index: XMLSchemaLoader.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaLoader.java,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- XMLSchemaLoader.java 9 Feb 2005 15:34:02 -0000 1.38 +++ XMLSchemaLoader.java 7 Mar 2005 23:25:34 -0000 1.39 @@ -1113,7 +1113,6 @@ */ public boolean canSetParameter(String name, Object value) { if(value instanceof Boolean){ - boolean state = ((Boolean)value).booleanValue(); if (name.equals(Constants.DOM_VALIDATE) || name.equals(SCHEMA_FULL_CHECKING) || name.equals(VALIDATE_ANNOTATIONS) || 1.17 +4 -4 xml-xerces/java/src/org/apache/xerces/impl/xpath/XPath.java Index: XPath.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xpath/XPath.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- XPath.java 4 Oct 2004 22:07:41 -0000 1.16 +++ XPath.java 7 Mar 2005 23:25:34 -0000 1.17 @@ -1921,7 +1921,7 @@ } if (ch == '.') { if (++currentOffset < endOffset) { - int start = currentOffset; + /** int start = currentOffset; **/ ch = data.charAt(currentOffset); while (ch >= '0' && ch <= '9') { part = (part * 10) + (ch - '0');
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]