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

LTP: XMLEncoder could not write object of type java.awt.Insets (fails since mustang-b76)

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b80
    • CPU:
      generic, x86
    • OS:
      generic, windows_xp
    • Verification:
      Verified

      Description

      JCK : JCK6.0 b20
      J2SE : FAIL - *SINCE* mustang b76
      Platform[s] : FAIL - seems to be all
      switch/Mode : FAIL - default
      Regression : Since tiger

      This test fails because b76 unable to run the following code (part of the test api/java_beans/XMLDecoder/index.html#read[XMLDecoder0034] ):

      import java.beans.*;
      import java.io.*;
      import java.awt.*;

      public class Bean{

      public static void main(String args[]){

              XMLEncoder xmlEnc = new XMLEncoder(new ByteArrayOutputStream());
              xmlEnc.writeObject(new java.awt.Insets(1, 2, 3, 4));
      }
      }

      then this code is run it displays at console the following message *without any exception*:

      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(Ins
      ets);
      Continuing ...

      and then everything goes wrong for api/java_beans/XMLDecoder/index.html#read[XMLDecoder0034]

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              malenkov Sergey Malenkov (Inactive)
              Reporter:
              pastepan Pavel Stepanov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: