Update to groovy 4.0.7 (#7478)
Supersedes https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/7473
This commit is contained in:
parent
ec5d44400e
commit
87b31475ef
|
@ -12,7 +12,7 @@ val dependencyVersions = hashMapOf<String, String>()
|
|||
rootProject.extra["versions"] = dependencyVersions
|
||||
|
||||
// Need both BOM and groovy jars
|
||||
val groovyVersion = "4.0.6"
|
||||
val groovyVersion = "4.0.7"
|
||||
|
||||
// We don't force libraries we instrument to new versions since we compile and test against specific
|
||||
// old baseline versions but we do try to force those libraries' transitive dependencies to new
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
package io.opentelemetry.instrumentation.api.annotation.support
|
||||
|
||||
import groovy.transform.CompileStatic
|
||||
import spock.lang.Specification
|
||||
|
||||
import java.lang.invoke.MethodHandles
|
||||
|
@ -41,10 +42,18 @@ class AnnotationReflectionHelperTest extends Specification {
|
|||
cls == null
|
||||
}
|
||||
|
||||
// Using @CompileStatic to ensure that groovy does not call MethodHandles.lookup using method
|
||||
// handles. MethodHandles.lookup is caller sensitive. Test fails with lookup where the caller is
|
||||
// an anonymous class.
|
||||
@CompileStatic
|
||||
private static MethodHandles.Lookup getLookup() {
|
||||
return MethodHandles.lookup()
|
||||
}
|
||||
|
||||
def "returns bound functional interface to annotation element"() {
|
||||
given:
|
||||
def function = AnnotationReflectionHelper.bindAnnotationElementMethod(
|
||||
MethodHandles.lookup(),
|
||||
getLookup(),
|
||||
CustomAnnotation,
|
||||
"value",
|
||||
String
|
||||
|
|
Loading…
Reference in New Issue