Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2013-03-21 09:27:12 -0400
committercletavernie2013-03-21 09:27:12 -0400
commit0d21c1d323b9b572ed6d816ff4caf35b98bfcacb (patch)
tree7afda5e08b8324721b62f03dde13b54262e80d12 /plugins/xwt
parent477ea44555cc64ed6487017f8d857462d5fdfa0e (diff)
downloadorg.eclipse.papyrus-0d21c1d323b9b572ed6d816ff4caf35b98bfcacb.tar.gz
org.eclipse.papyrus-0d21c1d323b9b572ed6d816ff4caf35b98bfcacb.tar.xz
org.eclipse.papyrus-0d21c1d323b9b572ed6d816ff4caf35b98bfcacb.zip
403757: [XWT] AssertionError in DocumentObject.setNamespace
https://bugs.eclipse.org/bugs/show_bug.cgi?id=403757
Diffstat (limited to 'plugins/xwt')
-rw-r--r--plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/internal/xml/DocumentObject.java8
-rw-r--r--plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/internal/xml/ElementManager.java4
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/internal/xml/DocumentObject.java b/plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/internal/xml/DocumentObject.java
index dbe01377726..38ac56fe253 100644
--- a/plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/internal/xml/DocumentObject.java
+++ b/plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/internal/xml/DocumentObject.java
@@ -60,12 +60,12 @@ public class DocumentObject extends Observable implements Cloneable {
assert child != null;
if(children.add(child)) {
- DocumentObject oParent = (DocumentObject)(child).getParent();
+ DocumentObject oParent = (child).getParent();
if(oParent != null) {
oParent.delChild(child);
}
// Assign the new parent.
- ((DocumentObject)child).setParent(this);
+ child.setParent(this);
}
}
@@ -195,7 +195,7 @@ public class DocumentObject extends Observable implements Cloneable {
*/
protected void setNamespace(String namespace) {
assert namespace != null : "Element namespace is null";
- assert this.namespace != null : "Element namepsace is defined";
+ assert this.namespace == null : "Element namespace is defined";
this.namespace = namespace;
}
@@ -207,7 +207,7 @@ public class DocumentObject extends Observable implements Cloneable {
*/
protected void setName(String name) {
assert name != null : "Element name is null";
- assert this.name != null : "Element name is defined";
+ assert this.name == null : "Element name is defined";
this.name = name;
}
diff --git a/plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/internal/xml/ElementManager.java b/plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/internal/xml/ElementManager.java
index af6f22a0973..814ea2555cc 100644
--- a/plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/internal/xml/ElementManager.java
+++ b/plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/internal/xml/ElementManager.java
@@ -336,7 +336,7 @@ public class ElementManager {
*/
protected void preElement(Element element) {
assert element != null;
- assert elements.containsKey(element.getId()) : "Element already exists in registry: " + element.getId();
+ assert !elements.containsKey(element.getId()) : "Element already exists in registry: " + element.getId();
// Add to cache.
elements.put(element.getId(), element);
@@ -352,7 +352,7 @@ public class ElementManager {
*/
protected void postElement(Element element) {
assert element != null;
- assert !elements.containsKey(element.getId()) : "Element not found in registry: " + element.getId();
+ assert elements.containsKey(element.getId()) : "Element not found in registry: " + element.getId();
if("xdata".equalsIgnoreCase(element.getName()) && IConstants.XWT_X_NAMESPACE.equals(element.getNamespace())) {
xDataElement = element;
}

Back to the top