Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-2613

ClassFileUtils.java can invoke Unsafe under JDK 11 causing a NoClassDefFoundError

    Details

      Description

      I tried to do my homework but didn't see any other issue in the issue tracker with Weld as the project and "sun misc Unsafe" as search keywords. Feel free to close if this is a duplicate.

      ClassUtils.java line 75 features a blind invocation of sun.misc.Unsafe that throws a NoClassDefFoundError under JDK 11. Here's the source link: https://github.com/weld/core/blob/8d4fb65fcba96a41abbf8c019f8162a786cc1435/impl/src/main/java/org/jboss/weld/util/bytecode/ClassFileUtils.java#L75

      It's my understanding that Unsafe is no longer present in JDK 11.

      We stumbled across this when a user mistakenly used the module path in case it matters.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  manovotn Matěj Novotný
                  Reporter:
                  ljnelson Laird Nelson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: