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

Thread.setContextClassloader from thread in FJP commonPool task no longer works after JDK-8327501

    XMLWordPrintable

Details

    • b14
    • 23
    • b18
    • generic
    • generic

    Description

      Christian Wimmer in JDK-8327501 writes:

      The fix for JDK-8327501 has a compatibility impact that has been overlooked: Using `InnocuousForkJoinWorkerThread` means that any task that runs in the common pool can no longer use `Thread.currentThread().setContextClassLoader(...)` - that unconditionally throws a `SecurityException`.

      This breaks many existing Java libraries and frameworks. One example is Quarkus. See:
      https://github.com/quarkusio/quarkus/issues/39526

      Attachments

        Issue Links

          Activity

            People

              vklang Viktor Klang
              sgehwolf Severin Gehwolf
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: