Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-382

Byteman JUnit5 uses Optional.isEmpty() which was introduced in JDK11

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.0.6
    • Fix Version/s: 4.0.7
    • Component/s: Contrib
    • Labels:
      None

      Description

      Byteman JUnit5 uses Optional.isEmpty() which was introduced in JDK11. So Byteman with JUnit5 fails on all JDKs except JDK11.

      java.lang.NoSuchMethodError: java.util.Optional.isEmpty()Z
      	at org.jboss.byteman.contrib.bmunit.BMUnit5ConfigHandler.beforeAll(BMUnit5ConfigHandler.java:48)
      	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassTestDescriptor.java:361)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.invokeBeforeAllCallbacks(ClassTestDescriptor.java:361)
      	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.before(ClassTestDescriptor.java:197)
      	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.before(ClassTestDescriptor.java:77)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:132)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
      	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
      	at java.util.ArrayList.forEach(ArrayList.java:1257)
      	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
      	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
      	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
      	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
      	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:220)
      	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:188)
      	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
      	at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:89)
      	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
      	Suppressed: java.lang.Exception: BMUnit test class configuration popped without prior push!
      		at org.jboss.byteman.contrib.bmunit.BMUnitConfigState.popConfigurationState(BMUnitConfigState.java:683)
      		at org.jboss.byteman.contrib.bmunit.BMUnit5ConfigHandler.uninstall(BMUnit5ConfigHandler.java:70)
      		at org.jboss.byteman.contrib.bmunit.BMUnit5ConfigHandler.uninstall(BMUnit5ConfigHandler.java:32)
      		at org.jboss.byteman.contrib.bmunit.BMUnit5AbstractHandler.afterAll(BMUnit5AbstractHandler.java:104)
      		at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.lambda$invokeAfterAllCallbacks$12(ClassTestDescriptor.java:399)
      		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      		at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.lambda$invokeAfterAllCallbacks$13(ClassTestDescriptor.java:399)
      		at java.util.ArrayList.forEach(ArrayList.java:1257)
      		at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.invokeAfterAllCallbacks(ClassTestDescriptor.java:399)
      		at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.after(ClassTestDescriptor.java:221)
      		at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.after(ClassTestDescriptor.java:77)
      		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:145)
      		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:145)
      		... 29 more
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                adinn Andrew Dinn
                Reporter:
                jpalka Jarosław Pałka
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: