Skip to content

Commit 1b47f6c

Browse files
committed
Add Java 7 instrumentation manifest attributes
Update META-INF/MANIFEST.MF for spring-instrument to include necessary attributes for running under Java 7: Can-Redefine-Classes : true Can-Retransform-Classes: true Can-Set-Native-Method-Prefix : false (see http://docs.oracle.com/javase/7/docs/api/java/lang/instrument/ package-summary.html) Prior to this commit `InstrumentationSavingAgent.getInstrumentation(). addTransformer(t, true);` would fail under Java 7. Issue: SPR-10731 (Cherry picked from 50333ca)
1 parent 66e4c9b commit 1b47f6c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,9 @@ project("spring-instrument") {
297297
jar {
298298
manifest.attributes["Premain-Class"] =
299299
"org.springframework.instrument.InstrumentationSavingAgent"
300+
manifest.attributes["Can-Redefine-Classes"] = "true"
301+
manifest.attributes["Can-Retransform-Classes"] = "true"
302+
manifest.attributes["Can-Set-Native-Method-Prefix"] = "false"
300303
}
301304
}
302305

0 commit comments

Comments
 (0)