Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-3480

Unexpected functionality added by Java8 default interface methods

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • RHDG 8.0 CR1
    • RHDG 7.3.5 GA, RHDG 8.0 ER2
    • None
    • None
    • CR1
    • +
    • DataGrid Sprint #41

      With Java8 there are interfaces which implement default methods.
      Those defaults are available if not overridden, but the function behind might not be correct because the method was not meant to be implemented.

      There are issues with the transaction and locking because of the remote invocation, so the conditional operation will not work consistent.

      Such methods need to be checked and throw a UnsupportedOperation.

      This appears for the compute(...) methods
      compute(key, BiFunct) -> default to java.util.concurrent.ConcurrentMap interface
      compute() methods with expiration will throw an UnsupportedOperationException as expected.

              wburns@redhat.com Will Burns
              rhn-support-wfink Wolf Fink
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: