Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-4473

[classlib][beans] Current bean implementation does not persist awt.Choice properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • Classlib
    • None

    Description

      The following test case will throw StackOverflowError on Harmony but pass on RI:
      public void test_writeObject_java_awt_Choice()

      { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream( byteArrayOutputStream)); Choice choice = new Choice(); encoder.writeObject(choice); encoder.close(); DataInputStream stream = new DataInputStream(new ByteArrayInputStream( byteArrayOutputStream.toByteArray())); XMLDecoder decoder = new XMLDecoder(stream); Choice aChoice = (Choice) decoder.readObject(); assertEquals(choice.getFocusTraversalKeysEnabled(), aChoice .getFocusTraversalKeysEnabled()); }

      Besides Choice, the awt classes need special treatment are:
      SystemColor,
      TextAttribute,
      MenuShortcut,
      awt.Component,
      awt.Container,
      Menu,
      MenuBar,
      awt.List,
      BorderLayout,
      CardLayout,
      GridLayout,
      Insets,
      Point,
      ScrollPane

      Attachments

        1. HY-4473.sh
          0.3 kB
          spark shen
        2. HY-4473.patch
          51 kB
          spark shen

        Issue Links

          Activity

            People

              tony.wu Tony Wu
              spark shen spark shen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: