Author: veithen
Date: Thu Apr 5 20:48:02 2012
New Revision: 1310066
URL: http://svn.apache.org/viewvc?rev=1310066&view=rev
Log:
Removed the read-only stuff in AttributeMap. For the reasons, see r1307924.
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttributeMap.java
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttributeMap.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttributeMap.java?rev=1310066&r1=1310065&r2=1310066&view=diff
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttributeMap.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttributeMap.java
Thu Apr 5 20:48:02 2012
@@ -37,8 +37,6 @@ public class AttributeMap implements Nam
private short flags;
- private final static short READONLY = 0x1 << 0;
-
private final static short CHANGED = 0x1 << 1;
private final static short HASDEFAULTS = 0x1 << 2;
@@ -87,13 +85,6 @@ public class AttributeMap implements Nam
public Node removeNamedItem(String name) throws DOMException {
// TODO Set used to false
- if (isReadOnly()) {
- String msg = DOMMessageFormatter.formatMessage(
- DOMMessageFormatter.DOM_DOMAIN,
- DOMException.NO_MODIFICATION_ALLOWED_ERR, null);
- throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
- msg);
- }
int i = findNamePoint(name, 0);
if (i < 0) {
String msg = DOMMessageFormatter.formatMessage(
@@ -110,13 +101,6 @@ public class AttributeMap implements Nam
public Node removeNamedItemNS(String namespaceURI, String name)
throws DOMException {
- if (isReadOnly()) {
- String msg = DOMMessageFormatter.formatMessage(
- DOMMessageFormatter.DOM_DOMAIN,
- DOMException.NO_MODIFICATION_ALLOWED_ERR, null);
- throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
- msg);
- }
int i = findNamePoint(namespaceURI, name);
if (i < 0) {
String msg = DOMMessageFormatter.formatMessage(
@@ -133,13 +117,6 @@ public class AttributeMap implements Nam
/** Almost a copy of the Xerces impl. */
public Node setNamedItem(Node attribute) throws DOMException {
- if (isReadOnly()) {
- String msg = DOMMessageFormatter.formatMessage(
- DOMMessageFormatter.DOM_DOMAIN,
- DOMException.NO_MODIFICATION_ALLOWED_ERR, null);
- throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
- msg);
- }
if (attribute.getOwnerDocument() != ownerNode.getOwnerDocument()) {
String msg = DOMMessageFormatter.formatMessage(
DOMMessageFormatter.DOM_DOMAIN,
@@ -199,13 +176,6 @@ public class AttributeMap implements Nam
/** Almost a copy of the Xerces impl. */
public Node setNamedItemNS(Node attribute) throws DOMException {
- if (isReadOnly()) {
- String msg = DOMMessageFormatter.formatMessage(
- DOMMessageFormatter.DOM_DOMAIN,
- DOMException.NO_MODIFICATION_ALLOWED_ERR, null);
- throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
- msg);
- }
if (attribute.getOwnerDocument() != ownerNode.getOwnerDocument()) {
String msg = DOMMessageFormatter.formatMessage(
DOMMessageFormatter.DOM_DOMAIN,
DOMException.WRONG_DOCUMENT_ERR, null);
@@ -294,14 +264,6 @@ public class AttributeMap implements Nam
} // cloneContent():AttributeMap
- final boolean isReadOnly() {
- return (flags & READONLY) != 0;
- }
-
- final void isReadOnly(boolean value) {
- flags = (short) (value ? flags | READONLY : flags & ~READONLY);
- }
-
final boolean changed() {
return (flags & CHANGED) != 0;
}