Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-4398

UnsupportedOperationException in the compatability layer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • java version "11" 2018-09-25
      Java(TM) SE Runtime Environment 18.9 (build 11+28)
      Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11+28, mixed mode)

    • This server is running CraftBukkit version git-Spigot-f6a273b-4824655 (MC: 1.13.1) (Implementing API version 1.13.1-R0.1-SNAPSHOT)
    • Yes

      Java 11 introduced nest-based access control. The java compiler no longer generates package-protected bridge methods when inner classes access private members of their outer classes, but instead the compiler outputs the nest host and nest members in the bytecode of classes. The JVM allows access to those private members if the classes belong to the same nest.

      CraftBukkit's compability layer calls ClassVisitor#readNestHostExperimental which throws the exception, even though my plugin has api-version 1.13 defined in its plugin.yml.

      I think the bug can easily be fixed by updating the ASM maven dependency and using Opcodes.ASM7, or by not using the compatibility layer for 1.13 plugins.

        1. DemoPlugin.jar
          4 kB
        2. DummyPlugin.java
          0.4 kB
        3. latest.log
          18 kB
        4. plugin.yml
          0.1 kB

            Unassigned Unassigned
            Jannyboy11 Jan Boerman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: