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

Improve lazy computation in BreakIteratorResourceBundle and related classes

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 26
    • None
    • core-libs

      The `Set` exposed via the lazy computation:

                          ResourceBundle info = getBreakIteratorInfo();
                          Set<String> k = info.keySet();
                          k.removeAll(NON_DATA_KEYS);

      is using a mutable set. Also, the laziness could be better handled by Stable Values rather than a double-checked locking solution.

            pminborg Per-Ake Minborg
            pminborg Per-Ake Minborg
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: