Browse Source

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
pull/311/merge
Phillip Webb 11 years ago
parent
commit
50333ca68e
  1. 3
      build.gradle

3
build.gradle

@ -267,6 +267,9 @@ project("spring-instrument") { @@ -267,6 +267,9 @@ project("spring-instrument") {
jar {
manifest.attributes["Premain-Class"] =
"org.springframework.instrument.InstrumentationSavingAgent"
manifest.attributes["Can-Redefine-Classes"] = "true"
manifest.attributes["Can-Retransform-Classes"] = "true"
manifest.attributes["Can-Set-Native-Method-Prefix"] = "false"
}
}

Loading…
Cancel
Save