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

CSSEvent contains null rule for cached values

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.1
    • Component/s: javafx

      Description

      I am in a case where 2 Rectangle with the same ID+same style class are added to the scene. A stylesheet file contains rules that impact the Rectangle instances.

      I do receive valid CSS events for the first instance, but the rule attached to the events associated to the second instance contains null rule.

      After discussion with David, it appears that the null values are related to the cached values. This problem can be workarounded by caching rules for StyleCacheKey instance.
      I am currently using a Map<StyleCacheKey, Map<String, List<Rule>>> to store valid rules, and reuse this map to retrieve rules for the received null rule events.

      It is enough for VT early access, but would be a great simplification if this problem was fixed.

      JF

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dgrieve David Grieve (Inactive)
                Reporter:
                jfdenise Jean-Francois Denise (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: