package org.eclipse.persistence.testing.oxm.mappings.anyobject.withoutgroupingelement;

import org.eclipse.persistence.oxm.XMLRoot;
import org.eclipse.persistence.testing.oxm.mappings.XMLMappingTestCases;

import com.sun.org.apache.xerces.internal.dom.ElementNSImpl;

public class RootKeepAsElement {

    protected Object t1;

    public Object getT1() {
        return t1;
    }
 
    public void setT1(Object value) {
        this.t1 = value;
    }
    
    public boolean equals(Object object) {
        if (object instanceof RootKeepAsElement) {
            if (t1 == null && ((RootKeepAsElement) object).getT1() == null) {
                return true;
            } else if (t1 == null && ((RootKeepAsElement) object).getT1() != null) {
                return false;
            } else {
                Object value1 = t1;
                Object value2 = ((RootKeepAsElement) object).getT1();
                if ((value1 instanceof ElementNSImpl) && (value2 instanceof ElementNSImpl)) {
                    ElementNSImpl elem1 = (ElementNSImpl) value1;
                    ElementNSImpl elem2 = (ElementNSImpl) value2;
                    
                    XMLMappingTestCases.assertEquals(elem1.getLocalName(), elem2.getLocalName());
                    XMLMappingTestCases.assertEquals(elem1.getNamespaceURI(), elem2.getNamespaceURI());
                    XMLMappingTestCases.assertEquals(elem1.getUserData(), elem2.getUserData());
                    
                    return true;
                } else {
                    return this.t1.equals(((RootKeepAsElement) object).getT1());
                }
            }
        }
        return false;
    }    

}
@@ -215,42 +215,15 @@
 ort 
-com.sun.org.apache.xerces.internal
+org.w3c
 .dom
@@ -230,22 +230,16 @@
 .Element
-NSImpl
 ;%0D%0A%0D%0Apub
@@ -934,22 +934,16 @@
  Element
-NSImpl
 ) && (va
@@ -965,22 +965,16 @@
  Element
-NSImpl
 )) %7B%0D%0A  
@@ -994,30 +994,24 @@
      Element
-NSImpl
  elem1 = (El
@@ -1011,32 +1011,26 @@
 1 = (Element
-NSImpl)
  
+)
 value1;%0D%0A   
@@ -1053,22 +1053,16 @@
  Element
-NSImpl
  elem2 =
@@ -1074,14 +1074,8 @@
 ment
-NSImpl
 ) va
@@ -1127,40 +1127,12 @@
     
-XMLMappingTestCases.assertEquals
+if(!
 (ele
@@ -1148,18 +1148,24 @@
 alName()
-, 
+.equals(
 elem2.ge
@@ -1177,17 +1177,20 @@
 lName())
-;
+)) %7B
 %0D%0A      
@@ -1207,188 +1207,48 @@
     
-XMLMappingTestCases.assertEquals(elem1.getNamespaceURI(), elem2.getNamespaceURI());%0D%0A                    XMLMappingTestCases.assertEquals(elem1.getUserData(), elem2.getUserData());
+    return false;%0D%0A                    %7D
 %0D%0A  

Test case fix for bug 269262, fix cb failure