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

The Javadocs for observing list element changes via extractors could be more clear it's actually based on invalidations.

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P5
    • tbd
    • 8u40
    • javafx

    Description

      The Javadoc for FXCollections says (ex:) the following with regards to using an extractor:

      "Observable objects returned by extractor (applied to each list element) are listened for changes and transformed into "update" change of ListChangeListener."

      However, the implementation technically listens for invalidation of the observable values provided by the extractor. I think it would be more accurate to say:

      "Observable objects returned by extractor (applied to each list element) are listened for invalidation and transformed into "update" change of ListChangeListener."

      The only scenario I can think of where the distinction actually makes a difference is if someone is trying to learn the API and is printing list updates to the console. Ex:

      https://community.oracle.com/message/12998710

      I've noticed (at least) two places in the Javadoc where this is the case:

      https://docs.oracle.com/javase/8/javafx/api/javafx/collections/FXCollections.html#observableList-java.util.List-javafx.util.Callback-
      https://docs.oracle.com/javase/8/javafx/api/javafx/collections/FXCollections.html#observableArrayList-javafx.util.Callback-

      Attachments

        Activity

          People

            Unassigned Unassigned
            rjaebjfx Ryan Jaeb (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Imported: