Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6406290

REGRESSION: XML Persistance Delegate for Insets broken in Mustang B77

    XMLWordPrintable

Details

    • x86
    • windows_xp

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              malenkov Sergey Malenkov (Inactive)
              vsosninsunw Vladimir Sosnin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: