Issue
Since I migrated my instance to JDK 17, some Groovy code fails, for example, using List.of
throws the following in the build log:
java.lang.VerifyError: (class: java_util_List$of$17, method: call signature: (Ljava/lang/Object;)Ljava/lang/Object;) Illegal type in constant pool
Workaround
Seems there is no workaround other than avoiding direct calls to static interface methods from Groovy scripts.
This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.