Skip to content

Commit f718bb1

Browse files
moscherjernst
andauthored
Upgrade ASM to 9.9 (#136963) (#137036)
This allows reading classfile from JDK 26. (cherry picked from commit af6d157) # Conflicts: # libs/entitlement/build.gradle # libs/entitlement/tools/public-callers-finder/build.gradle Co-authored-by: Ryan Ernst <[email protected]>
1 parent 458e532 commit f718bb1

File tree

14 files changed

+76
-30
lines changed

14 files changed

+76
-30
lines changed

distribution/tools/plugin-cli/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ dependencies {
2626
implementation project(":libs:plugin-scanner")
2727
implementation project(":libs:entitlement")
2828
// TODO: asm is picked up from the plugin scanner and entitlements, we should consolidate so it is not defined twice
29-
implementation 'org.ow2.asm:asm:9.8'
30-
implementation 'org.ow2.asm:asm-tree:9.8'
29+
implementation 'org.ow2.asm:asm:9.9'
30+
implementation 'org.ow2.asm:asm-tree:9.9'
3131

3232
api "org.bouncycastle:bcpg-fips:1.0.7.1"
3333
api "org.bouncycastle:bc-fips:1.0.2.6"

docs/changelog/136963.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 136963
2+
summary: Upgrade ASM to 9.9
3+
area: Infra/Core
4+
type: upgrade
5+
issues: []

gradle/verification-metadata.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4803,6 +4803,11 @@
48034803
<sha256 value="876eab6a83daecad5ca67eb9fcabb063c97b5aeb8cf1fca7a989ecde17522051" origin="Generated by Gradle"/>
48044804
</artifact>
48054805
</component>
4806+
<component group="org.ow2.asm" name="asm" version="9.9">
4807+
<artifact name="asm-9.9.jar">
4808+
<sha256 value="03d99a74ad1ee5c71334ef67437f4ef4fe3488caa7c96d8645abc73c8e2017d4" origin="Generated by Gradle"/>
4809+
</artifact>
4810+
</component>
48064811
<component group="org.ow2.asm" name="asm-analysis" version="7.2">
48074812
<artifact name="asm-analysis-7.2.jar">
48084813
<sha256 value="be922aae60ff1ff1768e8e6544a38a7f92bd0a6d6b0b9791f94955d1bd453de2" origin="Generated by Gradle"/>
@@ -4828,6 +4833,11 @@
48284833
<sha256 value="e640732fbcd3c6271925a504f125e38384688f4dfbbf92c8622dfcee0d09edb9" origin="Generated by Gradle"/>
48294834
</artifact>
48304835
</component>
4836+
<component group="org.ow2.asm" name="asm-analysis" version="9.9">
4837+
<artifact name="asm-analysis-9.9.jar">
4838+
<sha256 value="6a15d28e8bd29ba4fd5bca4baf9b50e8fba2d7b51fbf78cfa0c875a7214c678b" origin="Generated by Gradle"/>
4839+
</artifact>
4840+
</component>
48314841
<component group="org.ow2.asm" name="asm-commons" version="7.2">
48324842
<artifact name="asm-commons-7.2.jar">
48334843
<sha256 value="0e86b8b179c5fb223d1a880a0ff4960b6978223984b94e62e71135f2d8ea3558" origin="Generated by Gradle"/>
@@ -4858,6 +4868,11 @@
48584868
<sha256 value="3301a1c1cb4c59fcc5292648dac1d7c5aed4c0f067dfbe88873b8cdfe77404f4" origin="Generated by Gradle"/>
48594869
</artifact>
48604870
</component>
4871+
<component group="org.ow2.asm" name="asm-commons" version="9.9">
4872+
<artifact name="asm-commons-9.9.jar">
4873+
<sha256 value="db2f6f26150bbe7c126606b4a1151836bcc22a1e05a423b3585698bece995ff8" origin="Generated by Gradle"/>
4874+
</artifact>
4875+
</component>
48614876
<component group="org.ow2.asm" name="asm-tree" version="7.2">
48624877
<artifact name="asm-tree-7.2.jar">
48634878
<sha256 value="c063f5a67fa03cdc9bd79fd1c2ea6816cc4a19473ecdfbd9e9153b408c6f2656" origin="Generated by Gradle"/>
@@ -4903,6 +4918,11 @@
49034918
<sha256 value="14b7880cb7c85eed101e2710432fc3ffb83275532a6a894dc4c4095d49ad59f1" origin="Generated by Gradle"/>
49044919
</artifact>
49054920
</component>
4921+
<component group="org.ow2.asm" name="asm-tree" version="9.9">
4922+
<artifact name="asm-tree-9.9.jar">
4923+
<sha256 value="42178f3775c9c63f9e5e1446747d29b4eca4d91bd6e75e5c43cfa372a47d38c6" origin="Generated by Gradle"/>
4924+
</artifact>
4925+
</component>
49064926
<component group="org.ow2.asm" name="asm-util" version="7.2">
49074927
<artifact name="asm-util-7.2.jar">
49084928
<sha256 value="6e24913b021ffacfe8e7e053d6e0ccc731941148cfa078d4f1ed3d96904530f8" origin="Generated by Gradle"/>
@@ -4918,6 +4938,11 @@
49184938
<sha256 value="8ba0460ecb28fd0e2980e5f3ef3433a513a457bc077f81a53bdc75b587a08d15" origin="Generated by Gradle"/>
49194939
</artifact>
49204940
</component>
4941+
<component group="org.ow2.asm" name="asm-util" version="9.9">
4942+
<artifact name="asm-util-9.9.jar">
4943+
<sha256 value="3842e13cfe324ee9ab7cdc4914be9943541ead397c17e26daf0b8a755bede717" origin="Generated by Gradle"/>
4944+
</artifact>
4945+
</component>
49214946
<component group="org.reactivestreams" name="reactive-streams" version="1.0.4">
49224947
<artifact name="reactive-streams-1.0.4.jar">
49234948
<sha256 value="f75ca597789b3dac58f61857b9ac2e1034a68fa672db35055a8fb4509e325f28" origin="Generated by Gradle"/>

libs/entitlement/asm-provider/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ dependencies {
1313
compileOnly project(':libs:entitlement')
1414
compileOnly project(':libs:core')
1515
compileOnly project(':libs:logging')
16-
implementation 'org.ow2.asm:asm:9.8'
17-
implementation 'org.ow2.asm:asm-util:9.8'
18-
implementation 'org.ow2.asm:asm-tree:9.8'
19-
implementation 'org.ow2.asm:asm-analysis:9.8'
16+
implementation 'org.ow2.asm:asm:9.9'
17+
implementation 'org.ow2.asm:asm-util:9.9'
18+
implementation 'org.ow2.asm:asm-tree:9.9'
19+
implementation 'org.ow2.asm:asm-analysis:9.9'
2020
testImplementation project(":test:framework")
2121
testImplementation project(":libs:entitlement:bridge")
2222
}

libs/entitlement/tools/jdk-api-extractor/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ repositories {
3838

3939
dependencies {
4040
compileOnly(project(':libs:core'))
41-
implementation 'org.ow2.asm:asm:9.8'
42-
implementation 'org.ow2.asm:asm-util:9.8'
41+
implementation 'org.ow2.asm:asm:9.9'
42+
implementation 'org.ow2.asm:asm-util:9.9'
4343
implementation(project(':libs:entitlement:tools:common'))
4444
}
4545

libs/entitlement/tools/public-callers-finder/build.gradle

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,35 @@ application {
4242
]
4343
}
4444

45+
configurations {
46+
dumpMethods
47+
}
48+
49+
def instrumentedMethodsDump = project.layout.buildDirectory.file('instrumented-methods.dump').get().asFile
50+
4551
tasks.named("run").configure {
52+
dependsOn 'dumpInstrumentedMethods'
53+
systemProperty 'es.entitlements.dump', instrumentedMethodsDump
4654
executable = "${buildParams.runtimeJavaHome.get()}/bin/java" + (OS.current() == OS.WINDOWS ? '.exe' : '')
4755
}
4856

57+
tasks.register('dumpInstrumentedMethods', JavaExec) {
58+
classpath = configurations.dumpMethods
59+
mainClass = 'org.elasticsearch.entitlement.initialization.DynamicInstrumentationUtils'
60+
systemProperty 'es.entitlements.dump', instrumentedMethodsDump
61+
}
62+
4963
repositories {
5064
mavenCentral()
5165
}
5266

5367
dependencies {
5468
compileOnly(project(':libs:core'))
55-
implementation 'org.ow2.asm:asm:9.8'
56-
implementation 'org.ow2.asm:asm-util:9.8'
69+
implementation 'org.ow2.asm:asm:9.9'
70+
implementation 'org.ow2.asm:asm-util:9.9'
5771
implementation(project(':libs:entitlement:tools:common'))
72+
73+
dumpMethods testArtifact(project(':libs:entitlement'))
5874
}
5975

6076
tasks.named('forbiddenApisMain').configure {

libs/entitlement/tools/securitymanager-scanner/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ repositories {
5252

5353
dependencies {
5454
compileOnly(project(':libs:core'))
55-
implementation 'org.ow2.asm:asm:9.8'
56-
implementation 'org.ow2.asm:asm-util:9.8'
55+
implementation 'org.ow2.asm:asm:9.9'
56+
implementation 'org.ow2.asm:asm-util:9.9'
5757
implementation(project(':libs:entitlement:tools:common'))
5858
}
5959

libs/plugin-scanner/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ dependencies {
2020
api project(':libs:plugin-api')
2121
api project(":libs:x-content")
2222

23-
api 'org.ow2.asm:asm:9.8'
24-
api 'org.ow2.asm:asm-tree:9.8'
23+
api 'org.ow2.asm:asm:9.9'
24+
api 'org.ow2.asm:asm-tree:9.9'
2525

2626
testImplementation "junit:junit:${versions.junit}"
2727
testImplementation(project(":test:framework")) {

modules/lang-expression/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ dependencies {
1919
api "org.apache.lucene:lucene-expressions:${versions.lucene}"
2020
runtimeOnly "org.apache.lucene:lucene-codecs:${versions.lucene}"
2121
runtimeOnly "org.antlr:antlr4-runtime:${versions.antlr4}"
22-
runtimeOnly 'org.ow2.asm:asm:9.8'
23-
runtimeOnly 'org.ow2.asm:asm-commons:9.8'
24-
runtimeOnly 'org.ow2.asm:asm-tree:9.8'
25-
runtimeOnly 'org.ow2.asm:asm-analysis:9.8'
22+
runtimeOnly 'org.ow2.asm:asm:9.9'
23+
runtimeOnly 'org.ow2.asm:asm-commons:9.9'
24+
runtimeOnly 'org.ow2.asm:asm-tree:9.9'
25+
runtimeOnly 'org.ow2.asm:asm-analysis:9.9'
2626
}
2727
restResources {
2828
restApi {

modules/lang-painless/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ configurations {
3737

3838
dependencies {
3939
api "org.antlr:antlr4-runtime:${versions.antlr4}"
40-
api 'org.ow2.asm:asm-util:9.8'
41-
api 'org.ow2.asm:asm-tree:9.8'
42-
api 'org.ow2.asm:asm-commons:9.8'
43-
api 'org.ow2.asm:asm-analysis:9.8'
44-
api 'org.ow2.asm:asm:9.8'
40+
api 'org.ow2.asm:asm-util:9.9'
41+
api 'org.ow2.asm:asm-tree:9.9'
42+
api 'org.ow2.asm:asm-commons:9.9'
43+
api 'org.ow2.asm:asm-analysis:9.9'
44+
api 'org.ow2.asm:asm:9.9'
4545
spi project('spi')
4646
clusterModules project(':modules:mapper-extras')
4747
}

0 commit comments

Comments
 (0)