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

Do not prefer indexed properties

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 8
    • client-libs
    • None

        The java.awt.Window class contains following methods:

            public void setSize(Dimension d) {
                super.setSize(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.

              malenkov Sergey Malenkov (Inactive)
              malenkov Sergey Malenkov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: