Skip to content

Commit 50333ca

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
1 parent 1204d2a commit 50333ca

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
@@ -267,6 +267,9 @@ project("spring-instrument") {
267267
jar {
268268
manifest.attributes["Premain-Class"] =
269269
"org.springframework.instrument.InstrumentationSavingAgent"
270+
manifest.attributes["Can-Redefine-Classes"] = "true"
271+
manifest.attributes["Can-Retransform-Classes"] = "true"
272+
manifest.attributes["Can-Set-Native-Method-Prefix"] = "false"
270273
}
271274
}
272275

0 commit comments

Comments
 (0)