JDK-8034085 : Do not prefer indexed properties
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.beans
  • Affected Version: 8
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-02-10
  • Updated: 2016-01-13
  • Resolved: 2014-02-21
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.
8u40Fixed 9 b06Fixed
Related Reports
Relates :  
Relates :  
The java.awt.Window class contains following methods:

    public void setSize(Dimension d) {

    public void setSize(int width, int height) {
        super.setSize(width, height);

The Introspector class prefers the second method and creates the IndexedPropertyDescriptor object. Actually, it is not an indexed write method and we should create the PropertyDescriptor object, based on the first method.

The problem is that there are two properties, which contradict each other: normal property of the Dimension type and indexed property of the int type. We should ignore any indexed access method, because the type of normal property is not an array.
http://cr.openjdk.java.net/~malenkov/8034085.9.0/ The regression test checks for all combinations of getters and setters. It contains several bean with names like Bean1010, where first digit is used for getter (1-exist, 0-not) second digit is used for setter (1-exist, 0-not) third digit is used for indexed getter (1-exist, 0-not) fourth digit is used for indexed setter (1-exist, 0-not) Note, that a type of indexed property does not correspond to a property type and must be ignored.