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

Behavioral updates for ClassValue::remove

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 25
    • 25
    • core-libs
    • None

      The fix for stale values from ClassValue::remove in JDK-8351045 breaks backward compatibility and contracts that calls to remove from computeValue should be no-op. After investigation, a better solution is to ask users to use the remove API in a pattern that ensures no stale values are published, to reduce impacts.

      The usage pattern recommendation is simple: to call get() right after the input values for remove is updated and right before the remove() call. The previous test will be adjusted to verify this pattern is sound.

            liach Chen Liang
            liach Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: