author | ihse |
Tue, 20 Feb 2018 21:47:54 +0100 | |
changeset 48923 | b75c9e2e3b1f |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
28741
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
1 |
/* |
40631
ed82623d7831
8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents:
36851
diff
changeset
|
2 |
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. |
28741
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
4 |
* |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
8 |
* |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
13 |
* accompanied this code). |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
14 |
* |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
18 |
* |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
21 |
* questions. |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
22 |
*/ |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
23 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
24 |
/** |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
25 |
* @test |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
26 |
* @bug 8008678 |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
27 |
* @summary JSR 292: constant pool reconstitution must support pseudo strings |
40631
ed82623d7831
8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents:
36851
diff
changeset
|
28 |
* @library /test/lib |
36851 | 29 |
* @modules java.base/jdk.internal.misc |
29678
dd2f3932c21e
8075586: Add @modules as needed to the open hotspot tests
ykantser
parents:
28741
diff
changeset
|
30 |
* java.instrument |
dd2f3932c21e
8075586: Add @modules as needed to the open hotspot tests
ykantser
parents:
28741
diff
changeset
|
31 |
* java.management |
dd2f3932c21e
8075586: Add @modules as needed to the open hotspot tests
ykantser
parents:
28741
diff
changeset
|
32 |
* jdk.jartool/sun.tools.jar |
28741
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
33 |
* @compile -XDignore.symbol.file TestLambdaFormRetransformation.java |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
34 |
* @run main TestLambdaFormRetransformation |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
35 |
*/ |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
36 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
37 |
import java.io.IOException; |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
38 |
import java.lang.instrument.ClassFileTransformer; |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
39 |
import java.lang.instrument.IllegalClassFormatException; |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
40 |
import java.lang.instrument.Instrumentation; |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
41 |
import java.lang.instrument.UnmodifiableClassException; |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
42 |
import java.nio.file.Files; |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
43 |
import java.nio.file.Path; |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
44 |
import java.nio.file.Paths; |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
45 |
import java.security.ProtectionDomain; |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
46 |
import java.util.Arrays; |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
47 |
|
40631
ed82623d7831
8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents:
36851
diff
changeset
|
48 |
import jdk.test.lib.process.ExitCode; |
ed82623d7831
8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents:
36851
diff
changeset
|
49 |
import jdk.test.lib.process.OutputAnalyzer; |
ed82623d7831
8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents:
36851
diff
changeset
|
50 |
import jdk.test.lib.process.ProcessTools; |
28741
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
51 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
52 |
public class TestLambdaFormRetransformation { |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
53 |
private static String MANIFEST = String.format("Manifest-Version: 1.0\n" + |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
54 |
"Premain-Class: %s\n" + |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
55 |
"Can-Retransform-Classes: true\n", |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
56 |
Agent.class.getName()); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
57 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
58 |
private static String CP = System.getProperty("test.classes"); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
59 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
60 |
public static void main(String args[]) throws Throwable { |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
61 |
Path agent = TestLambdaFormRetransformation.buildAgent(); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
62 |
OutputAnalyzer oa = ProcessTools.executeTestJvm("-javaagent:" + |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
63 |
agent.toAbsolutePath().toString(), "-version"); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
64 |
oa.shouldHaveExitValue(ExitCode.OK.value); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
65 |
} |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
66 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
67 |
private static Path buildAgent() throws IOException { |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
68 |
Path manifest = TestLambdaFormRetransformation.createManifest(); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
69 |
Path jar = Files.createTempFile(Paths.get("."), null, ".jar"); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
70 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
71 |
String[] args = new String[] { |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
72 |
"-cfm", |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
73 |
jar.toAbsolutePath().toString(), |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
74 |
manifest.toAbsolutePath().toString(), |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
75 |
"-C", |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
76 |
TestLambdaFormRetransformation.CP, |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
77 |
Agent.class.getName() + ".class" |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
78 |
}; |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
79 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
80 |
sun.tools.jar.Main jarTool = new sun.tools.jar.Main(System.out, System.err, "jar"); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
81 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
82 |
if (!jarTool.run(args)) { |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
83 |
throw new Error("jar failed: args=" + Arrays.toString(args)); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
84 |
} |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
85 |
return jar; |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
86 |
} |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
87 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
88 |
private static Path createManifest() throws IOException { |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
89 |
Path manifest = Files.createTempFile(Paths.get("."), null, ".mf"); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
90 |
byte[] manifestBytes = TestLambdaFormRetransformation.MANIFEST.getBytes(); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
91 |
Files.write(manifest, manifestBytes); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
92 |
return manifest; |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
93 |
} |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
94 |
} |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
95 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
96 |
class Agent implements ClassFileTransformer { |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
97 |
private static Runnable lambda = () -> { |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
98 |
System.out.println("I'll crash you!"); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
99 |
}; |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
100 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
101 |
public static void premain(String args, Instrumentation instrumentation) { |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
102 |
if (!instrumentation.isRetransformClassesSupported()) { |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
103 |
System.out.println("Class retransformation is not supported."); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
104 |
return; |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
105 |
} |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
106 |
System.out.println("Calling lambda to ensure that lambda forms were created"); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
107 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
108 |
Agent.lambda.run(); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
109 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
110 |
System.out.println("Registering class file transformer"); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
111 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
112 |
instrumentation.addTransformer(new Agent()); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
113 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
114 |
for (Class c : instrumentation.getAllLoadedClasses()) { |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
115 |
if (c.getName().contains("LambdaForm") && |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
116 |
instrumentation.isModifiableClass(c)) { |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
117 |
System.out.format("We've found a modifiable lambda form: %s%n", c.getName()); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
118 |
try { |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
119 |
instrumentation.retransformClasses(c); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
120 |
} catch (UnmodifiableClassException e) { |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
121 |
throw new AssertionError("Modification of modifiable class " + |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
122 |
"caused UnmodifiableClassException", e); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
123 |
} |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
124 |
} |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
125 |
} |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
126 |
} |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
127 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
128 |
public static void main(String args[]) { |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
129 |
} |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
130 |
|
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
131 |
@Override |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
132 |
public byte[] transform(ClassLoader loader, |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
133 |
String className, |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
134 |
Class<?> classBeingRedefined, |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
135 |
ProtectionDomain protectionDomain, |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
136 |
byte[] classfileBuffer |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
137 |
) throws IllegalClassFormatException { |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
138 |
System.out.println("Transforming " + className); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
139 |
return classfileBuffer.clone(); |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
140 |
} |
1f10b1bd612d
8008678: JSR 292: constant pool reconstitution must support pseudo strings
sspitsyn
parents:
diff
changeset
|
141 |
} |