Skip to content

Commit

Permalink
Add Java 7 instrumentation manifest attributes
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
philwebb committed Jul 23, 2013
1 parent 66e4c9b commit 1b47f6c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,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"
}
}

Expand Down

0 comments on commit 1b47f6c

Please sign in to comment.