Author: nandana Date: Wed Sep 29 17:48:48 2010 New Revision: 1002789 URL: http://svn.apache.org/viewvc?rev=1002789&view=rev Log: Applying the patch for WSCOMMONS-556, cleaning up some commented code
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CharacterImpl.java webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CommentImpl.java Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java?rev=1002789&r1=1002788&r2=1002789&view=diff ============================================================================== --- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java (original) +++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java Wed Sep 29 17:48:48 2010 @@ -114,9 +114,6 @@ public class AttrImpl extends NodeImpl i && !"".equals(this.namespace.getPrefix()) && !(OMConstants.XMLNS_NS_PREFIX.equals(this.attrName))) { - //String nodeName = this.namespace.getPrefix() + ":" + this.attrName; - //return this.namespace.getPrefix().concat(prefixSeparater).concat(this.attrName); - // return nodeName; return new StringBuilder(20).append(this.namespace.getPrefix()) .append(prefixSeparater) @@ -126,11 +123,6 @@ public class AttrImpl extends NodeImpl i return this.attrName; } - /* return (this.namespace != null - && !"".equals(this.namespace.getPrefix()) && - !(OMConstants.XMLNS_NS_PREFIX.equals(this.attrName))) - ? this.namespace.getPrefix() + ":" + this.attrName - : this.attrName;*/ } /** @@ -168,24 +160,20 @@ public class AttrImpl extends NodeImpl i if ((OMConstants.XMLNS_NS_PREFIX.equals(this.attrName))) { return this.attrName; } else if (OMConstants.XMLNS_NS_URI.equals(this.namespace.getNamespaceURI())) { - //return OMConstants.XMLNS_NS_PREFIX + ":" + this.attrName; return new StringBuilder(20) .append(OMConstants.XMLNS_NS_PREFIX) .append(prefixSeparater) .append(this.attrName).toString(); - // return OMConstants.XMLNS_NS_PREFIX.concat(prefixSeparater).concat(this.attrName); } else if (this.namespace.getPrefix().equals("")) { return this.attrName; } else { - //return this.namespace.getPrefix() + ":" + this.attrName; return new StringBuilder(20) .append(this.namespace.getPrefix()) .append(prefixSeparater) .append(this.attrName).toString(); - - //return this.namespace.getPrefix().concat(prefixSeparater).concat(this.attrName); + } } else { return this.attrName; @@ -388,7 +376,7 @@ public class AttrImpl extends NodeImpl i public String getLocalName() { return (this.namespace == null) ? this.attrName : DOMUtil .getNameAndPrefix(this.attrName)[1]; - // .getLocalName(this.attrName); + } /** Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CharacterImpl.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CharacterImpl.java?rev=1002789&r1=1002788&r2=1002789&view=diff ============================================================================== --- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CharacterImpl.java (original) +++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CharacterImpl.java Wed Sep 29 17:48:48 2010 @@ -29,7 +29,6 @@ import org.w3c.dom.DOMException; */ public abstract class CharacterImpl extends ChildNode implements CharacterData { - // protected StringBuffer textValue; protected String textValue; protected CharacterImpl(OMFactory factory) { @@ -91,10 +90,8 @@ public abstract class CharacterImpl exte int end = Math.min(count + offset, length); if (data == null) { - //this.textValue.delete(offset, end); this.textValue = (new StringBuilder(textValue)).delete(offset, end).toString(); } else { - // this.textValue.replace(offset, end, data); this.textValue = (new StringBuilder(textValue)).replace(offset, end, data).toString(); } } @@ -125,15 +122,12 @@ public abstract class CharacterImpl exte "INDEX_SIZE_ERR", null)); } - //this.textValue.insert(offset, data); this.textValue = (new StringBuilder(textValue)).insert(offset, data).toString(); } /** Sets the text value of data. */ public void setData(String data) throws DOMException { if (!this.isReadonly()) { - //this.textValue.replace(0, this.getLength(), data); - //this.textValue = (new StringBuilder(textValue)).replace(0, this.getLength(), data).toString(); this.textValue = data; } else { throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CommentImpl.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CommentImpl.java?rev=1002789&r1=1002788&r2=1002789&view=diff ============================================================================== --- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CommentImpl.java (original) +++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CommentImpl.java Wed Sep 29 17:48:48 2010 @@ -54,7 +54,6 @@ public class CommentImpl extends Charact } public void setValue(String text) { - //this.textValue.delete(0, this.textValue.length()); this.textValue = text; }