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

[classlib][beans] dead loop in Encoder

    XMLWordPrintableJSON

Details

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

    Description

      The current implementation of Encoder/XMLEncoder/PersistentDelegate/DefaultPersistentDelegate runs into a dead loop while trying to encode bean like this:

      DeadLoopTest.java

      package test;

      import java.beans.*;

      public class DeadLoopTest {
      public DeadLoopTest getProp1()

      { return new DeadLoopTest(); }

      public void setProp1(DeadLoopTest val) {}

      public static void main(String argv[])

      { XMLEncoder encoder = new XMLEncoder(System.out); DeadLoopTest bean1 = new DeadLoopTest(); encoder.writeObject(bean1); encoder.close(); }

      }

      Please note that several classes from Harmony's AWT implementation contain patterns that are very close to this. For example Component.getLocation()/setLocation(), Component.getSize()/setSize().

      Attachments

        Issue Links

          Activity

            People

              zakha Alexei Zakharov
              zakha Alexei Zakharov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: