JDK-5063390 : backward compatibility problem with jdk1.5 and javabean
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.beans
  • Affected Version: 5.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_2.6
  • CPU: generic
  • Submitted: 2004-06-15
  • Updated: 2004-07-16
  • Resolved: 2004-07-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b59Fixed
Related Reports
Relates :  
Relates :  
Description
Introspection on javabeans used to return bean properties in the order they
appeared in the class definition- This is no longer occuring in jdk1.5 beta2 and and caused a test regression in j2ee1.4 when running with jdk1.5.
see bug 4991478.  

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-rc FIXED IN: tiger-rc INTEGRATED IN: tiger-b59 tiger-rc
03-08-2004

EVALUATION From ###@###.###: The Introspector stored properties in a TreeMap instead of a Hashtable in 1.4 (I believe). So JREs before that version kept the properties unsorted. As an optimization to get around the classloader memory leak of 4809008 a Soft/Weak reference solution was implemented. This had an adverse affect on performance so I tried to eek out as much optimization from the introspection code path as I could. One optimization was to use a HashMap instead of a TreeMap. I made this decision since there is nothing in the api javadoc that specifies that properties are sorted. I wish I could have kept the TreeMap but that's the way it goes. The reported bug 4991478 is a problem with JAX-RPC. They shouldn't infer any ordering of properties. It looks like this issue is closed. Unfortunately, JavaBeans doesn't have a concept of ordered properties. If the sorted properties are desired then a work around is to sort the properties after they have been returned from the Introspector. ###@###.### 2004-06-16 I restored the HashMaps back to TreeMaps, and the benchmark showed an 18% performance regression using test/java/beans/Introspector/PerformanceTest.java. =( As an alternative, I restored ONLY the properties map to TreeMap, and saw no performance regression. I've submitted this patch to the AS team to check that it is satisfactory. ###@###.### 2004-06-16 marks comments are noted. Unfortunately when using dii without wsdl the jaxrpc runtime has no way to determine ordering of properties other that using Introspection and refelection. There is not other information available to the runtime other than the class itself. My workaround using reflection is also not guarenteed to return the properties in the order of the class file. Tony ngs concern was jdk backward compatability, and therefore he asked me to submit this as a bug I am working on verifying the modification in the Introspection class that Brent provided. I am currently working remotely and having difficulties with appserver/sqe-test configuration due to remote lan restictions. Will get back to this on Monday, when I am on-campus. If the verification is critical and can not wait till monday, please get in touch. ###@###.### 2004-06-18 Still working on verification of brent change to Intospection.class. the test failing is a jaxrpc sqe test and currently the workspace is in state of flux and does not compile- Have sent message to jaxrpc sqe person, Rama, and waiting for response ###@###.### 2004-06-21 Verification of Brents Introspector.class with jaxrpc dii test failed- Same exception is noted with s1as8.0_01 - ###@###.### 2004-06-21 Rama has confirmed that my fix to the properties map passes the test case. ###@###.### 2004-07-14
21-06-2004