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

Convert XxxPropertyBases to SimpleXxxPropertys

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • jfx14
    • javafx
    • None

      The codebase has many occurrances of creating properties and overriding their getName and getBean methods, such as:

                  style = new StringPropertyBase("") {

                      @Override
                      protected void invalidated() {
                          reapplyCSS();
                      }

                      @Override
                      public Object getBean() {
                          return Node.this;
                      }

                      @Override
                      public String getName() {
                          return "style";
                      }
                  }

      These can be converted to `SimpleXxxProperty`s, which is shorter and clearer:

                  style = new SimpleStringProperty(Node.this, "style", "") {

                      @Override
                      protected void invalidated() {
                          reapplyCSS();
                      }
                  }

      This pattern occurs in many classes over several modules. To prevent potential merge conflicts, it might be needed to split this issue into a few issues targeting a different subset of classes each.

            nlisker Nir Lisker
            nlisker Nir Lisker
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: