Details
- 
        Type: Bug Bug
- 
        Status: Closed Closed
- 
            Resolution: Duplicate
- 
            Affects Version/s: None
- 
            Fix Version/s: 1.x Maintenance
- 
            Component/s: None
- 
            Labels:None
- 
                        JDK version and platform:sun jdk 1.5.0_07 for windows
Description
marshal object with follow member create wrong reference attribute in xml file
wrong xml output only occurs if dom4j driver is used.
class BadSelfReference implements Serializable {
  private static final long serialVersionUID = 38772160335615698L;
  private BadSelfReference owner = this;
  private String aString = "1234";
  private Long aLong = new Long(500);
// getter setter omitted
}
output
<testcase.BadSelfReference>
  <owner reference=".."/>
  <aString reference="..">1234</aString>
  <aLong>500</aLong>
</testcase.BadSelfReference>
how ever, the following class can marshal correctly
class GoodSelfReference implements Serializable {
  private static final long serialVersionUID = 38772160335615698L;
  private String aString = "1234";
  private Long aLong = new Long(500);
  private GoodSelfReference owner = this;
// getter setter omitted
}
output
<testcase.GoodSelfReference>
  <aString>1234</aString>
  <aLong>500</aLong>
  <owner reference=".."/>
</testcase.GoodSelfReference>
Issue Links
- duplicates
- 
             XSTR-345
        Dom4JWriter.addAttribute work incorrect XSTR-345
        Dom4JWriter.addAttribute work incorrect
-         

 
                            

See
XSTR-345