Skip to content

Commit 1d30c13

Browse files
committed
style fix.
1 parent 946afa7 commit 1d30c13

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/DynamicConstantTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class DynamicConstantTest extends GraalCompilerTest {
5858
private final Map<String, TestGenerator> generators = new LinkedHashMap<>();
5959

6060
private void add(TestGenerator gen) {
61-
generators.put(gen.className.replace('.', '/'), gen);
61+
generators.put(gen.taregtClassName.replace('.', '/'), gen);
6262
}
6363

6464
enum CondyType {
@@ -106,14 +106,14 @@ static class TestGenerator implements CustomizedBytecodePattern {
106106
/**
107107
* Name of the generated class.
108108
*/
109-
final String className;
109+
final String taregtClassName;
110110

111111
TestGenerator(Class<?> type, CondyType condyType) {
112112
String typeName = type.getSimpleName();
113113
this.type = cd(type);
114114
this.condyType = condyType;
115115
this.getter = "get" + typeName.substring(0, 1).toUpperCase() + typeName.substring(1);
116-
this.className = DynamicConstantTest.class.getName() + "$" + typeName + '_' + condyType;
116+
this.taregtClassName = DynamicConstantTest.class.getName() + "$" + typeName + '_' + condyType;
117117
}
118118

119119
@Override
@@ -214,7 +214,7 @@ public DynamicConstantTest() {
214214
public void test() throws Throwable {
215215
boolean jvmciCompatibilityChecked = false;
216216
for (TestGenerator e : generators.values()) {
217-
Class<?> testClass = e.getClass(e.className);
217+
Class<?> testClass = e.getClass(e.taregtClassName);
218218
ResolvedJavaMethod run = getResolvedJavaMethod(testClass, "run");
219219
if (!jvmciCompatibilityChecked) {
220220
checkJVMCICompatibility(run);

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/OptionsVerifierTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ private static Class<?> resolve(String name) {
157157
/**
158158
* Checks whether a given method is allowed to be called.
159159
*/
160-
private boolean checkInvokeTarget(MemberRefEntry method) throws ReflectiveOperationException {
160+
private static boolean checkInvokeTarget(MemberRefEntry method) {
161161
ClassDesc owner = method.owner().asSymbol();
162162
String methodName = method.name().stringValue();
163163

@@ -171,7 +171,7 @@ private boolean checkInvokeTarget(MemberRefEntry method) throws ReflectiveOperat
171171
return false;
172172
}
173173

174-
public void apply() throws IOException, ReflectiveOperationException {
174+
public void apply() throws IOException {
175175
ClassModel cm = ClassFile.of().parse(GraalServices.getClassfileAsStream(cls).readAllBytes());
176176

177177
cm.findAttribute(Attributes.sourceFile()).ifPresent(attr -> sourceFile = attr.sourceFile().stringValue());

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/SwitchFoldingTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@ private static boolean compareGraphs(StructuredGraph g1, StructuredGraph g2) {
555555
return true;
556556
}
557557

558+
@Override
558559
public byte[] generateClass(String className) {
559560
/*-
560561
* public static int m(boolean, int) {

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/UnbalancedMonitorsTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@
6363
public class UnbalancedMonitorsTest extends GraalCompilerTest implements CustomizedBytecodePattern {
6464
private static final String CLASS_NAME = UnbalancedMonitorsTest.class.getName();
6565
private static final String INNER_CLASS_NAME = CLASS_NAME + "$UnbalancedMonitors";
66-
private static final String CLASS_NAME_INTERNAL = CLASS_NAME.replace('.', '/');
67-
private static final String INNER_CLASS_NAME_INTERNAL = INNER_CLASS_NAME.replace('.', '/');
6866

6967
@Test
7068
public void runWrongOrder() throws Exception {

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/jfr/TestGetEventWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static class CustomizedClass implements CustomizedBytecodePattern {
220220
private String commitName;
221221
private boolean isStatic;
222222

223-
public CustomizedClass(String superClassName, Boolean isRegistered, String commitName, boolean isStatic) {
223+
CustomizedClass(String superClassName, Boolean isRegistered, String commitName, boolean isStatic) {
224224
this.superClassName = superClassName;
225225
this.isRegistered = isRegistered;
226226
this.commitName = commitName;

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/replacements/test/DeoptimizeOnExceptionTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ public static String test1Snippet(String m1, String m2, String m3, String m4, St
8383
return m1 + m2 + m3 + m4 + m5;
8484
}
8585

86+
@SuppressWarnings("unchecked")
8687
@Test
87-
public void test2() throws ReflectiveOperationException {
88+
public void test2() {
8889
try {
8990
Class<Runnable> testClass = (Class<Runnable>) getClass(DeoptimizeOnExceptionTest.class.getName() + "$" + "TestJSR");
9091
Runnable r = testClass.getDeclaredConstructor().newInstance();

0 commit comments

Comments
 (0)