Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
J2SE Version (please include all output from java -version flag): java version "1.6.0-beta2" Java(TM) SE Runtime Environment (build 1.6.0-beta2-b81) Java HotSpot(TM) Client VM (build 1.6.0-beta2-b81, mixed mode, sharing) Does this problem occur on J2SE 1.4.x or 5.0.x ? Yes / No (pick one) 5 and 6 Bug Description: Bean introspection does not correctly calculate types of inherited properties that are typed as a type parameter of a generic superclass. Steps to Reproduce (be specific): Compile and run these files Expected results ================ Bean Super Class class, R int count, RW Object reference, RW Bean Sub2 Class class, R int count, RW String reference, RW Bean Sub Class class, R int count, RW Integer reference, RW Actual results Mustang ====================== Bean Super Class class, R int count, RW Object reference, RW Bean Sub2 Class class, R int count, RW Object reference, RW Bean Sub Class class, R int count, RW Object reference, RW Impact ====== The incorrect typing normally has little impact because if you are using the introspector the methods are called reflectively, and you need to cast down to the correct type fromMethod.invoke() anyway, so the error is not normally apparent. If you were using a gui tool to wire up beans, the tool could exhibit problems resulting from the incorrect types. YOu may also break type safety. At work we are running 1.5.0_06 and Sub reported reference as Readonly,(presumably because the setter in Super was a different type. However I cannot reproduce this here at home on 1.5.0_03). That is how we first noticed it because JSF was reporting that our bean property was readonly and not letting us write to it. That occured on 2 different machines.
|