Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342877

Summary: with JDK 1.5, one of jaxb.listofobjects.ns.MapNamespaceTestCases failed
Product: z_Archived Reporter: Praba Vijayaratnam <prabaharan.vijayaratnam>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: rick.barkhouse
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch none

Description Praba Vijayaratnam CLA 2011-04-14 14:44:05 EDT
This test failed result comparison (test case need to be altered... As of now it's failing while order of elements in result xml don't match control xml) 

EL 2.3.0.v20110414-r9230
JDK 1.5.0_22
-----------
org.eclipse.persistence.testing.jaxb.listofobjects.ns.MapNamespaceTestCases.Java Project Source w/SAX Parsing: MapNamespaceTestCase: testRoundTrip

-----------------
Documents are not equal. CONTROL: <?xml version="1.0" encoding="UTF-8"?><mapObject xmlns="http://www.example.org"><map><entry><key xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">One</key><value xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:int">1</value></entry><entry><key xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">Two</key><value xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:int">2</value></entry></map></mapObject> TEST: <?xml version="1.0" encoding="UTF-8"?><mapObject xmlns="http://www.example.org"><map><entry><key xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">Two</key><value xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:int">2</value></entry><entry><key xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">One</key><value xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:int">1</value></entry></map></mapObject> 

junit.framework.AssertionFailedError: Documents are not equal.
CONTROL:
One1Two2
TEST:
Two2One1
at org.eclipse.persistence.testing.oxm.XMLTestCase.assertXMLIdentical(XMLTestCase.java:45)
at org.eclipse.persistence.testing.oxm.mappings.XMLMappingTestCases.objectToXMLDocumentTest(XMLMappingTestCases.java:286)
at org.eclipse.persistence.testing.jaxb.JAXBTestCases.objectToXMLStringWriter(JAXBTestCases.java:275)
at org.eclipse.persistence.testing.jaxb.JAXBTestCases.testRoundTrip(JAXBTestCases.java:185)
Comment 1 Rick Barkhouse CLA 2011-04-15 10:41:44 EDT
Created attachment 193381 [details]
Patch
Comment 2 Rick Barkhouse CLA 2011-04-15 10:43:30 EDT
Fixed -- changed test object's hashmap to only contain one element, so that unpredictable element ordering does not break the test.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:30:53 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink