JDK-6479286 : LTP: XMLEncoder does not persist LineBorder properly
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.beans
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-10-06
  • Updated: 2011-01-19
  • Resolved: 2007-02-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 Other
7Resolved OpenJDK6Fixed
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.7.0-internal"
Java(TM) SE Runtime Environment (build 1.7.0-internal-sm162706_05_oct_2006_15_12-b00)
Java HotSpot(TM) Client VM (build 1.6.0-rc-b100, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP Professional Service Pack 2

A DESCRIPTION OF THE PROBLEM :
The javax.swing.border.LineBorder with rounded corners could not be encoded/decoded successfully.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create new instance of LinBorder: new LineBorder( Color.RED, 2, true ).
2. Encode and decode created instance.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
<?xml version="1.0" encoding="UTF-8"?> 
<java version="1.7.0-internal" class="java.beans.XMLDecoder"> 
 <object class="javax.swing.border.LineBorder"> 
  <object class="java.awt.Color"> 
   <int>255</int> 
   <int>0</int> 
   <int>0</int> 
   <int>255</int> 
  </object> 
  <int>2</int> 
  <boolean>true</boolean>
 </object> 
</java> 
ACTUAL -
<?xml version="1.0" encoding="UTF-8"?> 
<java version="1.7.0-internal" class="java.beans.XMLDecoder"> 
 <object class="javax.swing.border.LineBorder"> 
  <object class="java.awt.Color"> 
   <int>255</int> 
   <int>0</int> 
   <int>0</int> 
   <int>255</int> 
  </object> 
  <int>2</int> 
 </object> 
</java>

Comments
EVALUATION It is fixed together with 6487891 valid annotation @ConstructorProperties was added.
19-02-2007

EVALUATION It is necessary to update parameters for default persistence delegate or use annotation @ConstructorProperties
10-10-2006