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

Names of some properties are incompatible with JavaBeans specification

XMLWordPrintable

      JavaBeans specification defines a rule how to infer property name from its setter and getter. This rule states to convert the first character of <PropertyName> in get<PropertyName>, set<PropertyName> to lowercase unless the <PropertyName> starts with two uppercase characters (this is implemented by java.beans.Introspector.decapitalize).

      Examples:
      getName, setName -> name
      getURL, setURL -> URL

      In addition to set<PropertyName>, get<PropertyName>, Java FX defines the <propertyName>Property method which returns the corresponding property object. Because the name of this method doesn't have any common prefix, the <propertyName> should match the inferred property name.

      Examples:
      getName, setName -> nameProperty
      getURL, setURL -> URLProperty

      Currently there are three properties which don't follow this JavaBean property name inference rule.

      They are:
      javafx.scene.chart.XYChart.Data: xValueProperty
      javafx.scene.chart.XYChart.Data: yValueProperty
      javafx.scene.shape.ArcTo: xAxisRotationProperty


      The correct names should be:
      XValueProperty (getXValue, setXValue -> XValueProperty)
      YValueProperty (getYValue, setYValue -> YValueProperty)
      XAxisRotationProperty (getXAxisRotation, setXAxisRotation -> XAxisRotationProperty)

            lnerad Ľubomír Nerád (Inactive)
            lnerad Ľubomír Nerád (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: