FULL PRODUCT VERSION : 1.6.0_02 ADDITIONAL OS VERSION INFORMATION : Solaris 9 (sparc) 09/04 A DESCRIPTION OF THE PROBLEM : java.beans.XMLEncoder produces errors when encoding TitledBorders with defaulted title color. This breaks in 1.6.0_02 but works fine in 1.5.0_11. (my apologies for not having more information in other fields but my Solaris box has no access to the internet). STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : javac test.java java test EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - No errors from XMLEncoder. ACTUAL - Errors printed to screen by XMLEncoder (or recieved via the exception handler API) ERROR MESSAGES/STACK TRACES THAT OCCUR : java.lang.InstantiationException: sun.swing.PrintColorUIResource Continuing... java.lang.Exception: XMLEncoder: discarding statement XMLEncoder.writeObject(PrintColorUIResource) REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- import java.awt.Color; import java.beans.XMLEncoder; import java.io.ByteArrayOutputStream; import javax.swing.UIManager; public class test { public static void main(String[] args) { Color c = UIManager.getColor("TtitledBorder.titledColor"); new XMLEncoder(new ByteArrayOutputStream()).writeObject(c); } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : When creating a TitledBorder, always specify the titleColor rather than relying on the default Ocean color. Release Regression From : 5.0u11 The above release value was the last known release where this bug was not reproducible. Since then there has been a regression.
|