-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
6
-
x86
-
windows_xp
A DESCRIPTION OF THE REGRESSION :
Works in 5.0 but not Mustang b77. Have not tested other builds.
XMLEncoder encoder = new XMLEncoder(new FileOutputStream("C:/temp.txt"));
encoder.writeObject(new Insets(1, 1, 1, 1));
The bug is probably related to 5082816 that got broken in 5.0 beta 2. That bug is confirmed but not fixed. This is a new bug though since this code works in 5.0.
REPRODUCIBLE TESTCASE OR STEPS TO REPRODUCE:
public class TestCase
{
public static void main(String[] args)
{
try {
XMLEncoder enc = new XMLEncoder(new FileOutputStream("Test.xml"));
enc.writeObject(new Insets(0, 0, 0, 0));
enc.close();
} catch (FileNotFoundException ex) {
ex.printStackTrace();
}
}
}
RELEASE LAST WORKED:
5.0 Update 6
RELEASE TEST FAILS:
mustang-beta
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
An XML File
ACTUAL -
java.lang.NoSuchMethodException: java.awt.Insets.getTop()
Continuing ...
java.lang.NoSuchMethodException: java.awt.Insets.getLeft()
Continuing ...
java.lang.NoSuchMethodException: java.awt.Insets.getBottom()
Continuing ...
java.lang.NoSuchMethodException: java.awt.Insets.getRight()
Continuing ...
java.lang.IllegalArgumentException
Continuing ...
java.lang.Exception: XMLEncoder: discarding statement XMLEncoder.writeObject(Insets);
OBSERVED APPLICATION IMPACT:
This will break any application that is using the XMLEncoder/XMLDecoder and with it serializes an Insets() object.
Works in 5.0 but not Mustang b77. Have not tested other builds.
XMLEncoder encoder = new XMLEncoder(new FileOutputStream("C:/temp.txt"));
encoder.writeObject(new Insets(1, 1, 1, 1));
The bug is probably related to 5082816 that got broken in 5.0 beta 2. That bug is confirmed but not fixed. This is a new bug though since this code works in 5.0.
REPRODUCIBLE TESTCASE OR STEPS TO REPRODUCE:
public class TestCase
{
public static void main(String[] args)
{
try {
XMLEncoder enc = new XMLEncoder(new FileOutputStream("Test.xml"));
enc.writeObject(new Insets(0, 0, 0, 0));
enc.close();
} catch (FileNotFoundException ex) {
ex.printStackTrace();
}
}
}
RELEASE LAST WORKED:
5.0 Update 6
RELEASE TEST FAILS:
mustang-beta
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
An XML File
ACTUAL -
java.lang.NoSuchMethodException: java.awt.Insets.getTop()
Continuing ...
java.lang.NoSuchMethodException: java.awt.Insets.getLeft()
Continuing ...
java.lang.NoSuchMethodException: java.awt.Insets.getBottom()
Continuing ...
java.lang.NoSuchMethodException: java.awt.Insets.getRight()
Continuing ...
java.lang.IllegalArgumentException
Continuing ...
java.lang.Exception: XMLEncoder: discarding statement XMLEncoder.writeObject(Insets);
OBSERVED APPLICATION IMPACT:
This will break any application that is using the XMLEncoder/XMLDecoder and with it serializes an Insets() object.
- duplicates
-
JDK-6402062 LTP: XMLEncoder could not write object of type java.awt.Insets (fails since mustang-b76)
- Closed
- relates to
-
JDK-5082816 LTP: MatteBorder can't be serialized to XML.
- Closed