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

ForkJoinPool.invoke(ForkJoinTask) does not specify behavior when task throws checked exception

    XMLWordPrintable

Details

    Description

      ForkJoinPool.invoke(ForkJoinTask) specifies that it rethrows errors and unchecked exceptions. It doesn't specify the behavior for tasks that throw a checked exception. The behavior in JDK 19-21 was to throw RuntimeException with the checked exception as the cause, this is probably the only sane behavior can that can be specified for this scenario.

      Attachments

        Issue Links

          Activity

            People

              dl Doug Lea
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: