Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-71818

CpsTransformerTest fails on Java 21

XMLWordPrintable

    • 3740.v6d35b_4ed5f9f

      The plugin reports test failure(s) when running on Java 21:

      [ERROR] Tests run: 98, Failures: 1, Errors: 0, Skipped: 9, Time elapsed: 1.796 s <<< FAILURE! -- in com.cloudbees.groovy.cps.CpsTransformerTest
      [ERROR] com.cloudbees.groovy.cps.CpsTransformerTest.exceptionFromNonCpsCodeShouldBeCaughtByCatchBlockInCpsCode -- Time elapsed: 0.007 s <<< FAILURE!
      java.lang.AssertionError: 
      
      Expected: ("String index out of range: -2" or "begin 5, end 3, length 3")
           but: was "Range [5, 3) out of bounds for length 3"
      	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
      	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
      	at com.cloudbees.groovy.cps.CpsTransformerTest.exceptionFromNonCpsCodeShouldBeCaughtByCatchBlockInCpsCode(CpsTransformerTest.java:189)
      	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
      

      Tested with maven 3.9.4, on macOS 13.5, using OpenJDK 21, callingĀ 

      mvn clean verify package

            basil Basil Crow
            notmyfault Alexander Brandes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: