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

Provide BeanInfo implementation that was useful for java.beans.Introspector caching

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 7u4
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      J2SE Version (please include all output from java -version flag):
      7u4 and 6u32


      Does this problem occur on J2SE 6ux or 7ux? Yes / No (pick one)
      works fine through early Java 5 through recent times with Java 6

      Bug Description:
      It used to be that one could rely upon java.beans.Introspector caching a given BeanInfo unless it was flushed -- at least as long as the bean class remained loaded.

      Have a fair bit of code relying upon this behavior to do JavaBeans persistence. Various classes in their static initializers retrieve their own BeanInfo and then adjust the transience of properties, set their persistence delegate, etc, therein. This worked just fine for years -- fairly early Java 5 through rather recent times with Java 6.

      Now find that Java 6 Update 32 and Java 7 Update 4 both no longer obey this implicit contract. It seems relate to bug#7064279 fix

          7064279: Introspector.getBeanInfo() should release some resources in timely manner


      Workaround: Essentially create an explicit XyzBeanInfo class for each Xyz bean class and do the BeanInfo changes in the constructor. It would be nice if the JDK provided a BeanInfo implementation that was usable towards this end (SimpleBeanInfo is clearly not as it doesn't return the default property descriptors, etc, and allow you to modify from there)

      Overall this is a bit painful for an update release. Need change ~70 files to address this.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              malenkov Sergey Malenkov (Inactive)
              Reporter:
              tyao Ting-Yun Ingrid Yao (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: