ScopedValue doesn't state that an exception thrown by an op is delegated to the caller

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P3
    • None
    • Affects Version/s: 21
    • Component/s: core-libs

      For example the following call to method ::run

              ScopedValue.where(ScopedValue.newInstance(), 123)
                      .run(() -> {throw new RuntimeException("Thrown by the op");});

      would result in getting the exact instance of RuntimeException that the op throws.

      Same for other methods of j.l.ScopedValue/Carrier accepting an op

      This exception as-is delegation to the caller deserves to be explicitly mentioned in j.l.ScopedValue+Carrier specs

            Assignee:
            Alan Bateman
            Reporter:
            Dmitry Bessonov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: