Skip to content

Commit 3d596f8

Browse files
committed
style fix
1 parent 19ea6a3 commit 3d596f8

File tree

52 files changed

+31
-118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+31
-118
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ public void test() {
238238
runTest(new InvariantsTool());
239239
}
240240

241-
@SuppressWarnings("try")
242241
public static void runTest(InvariantsTool tool) {
243242
RuntimeProvider rt = Graal.getRequiredCapability(RuntimeProvider.class);
244243
Providers providers = rt.getHostBackend().getProviders();

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ protected InstalledCode getCode(ResolvedJavaMethod installedCodeOwner, Structure
104104
}
105105
}
106106

107-
@SuppressWarnings("try")
108107
private InstalledCode getCodeHelper(ResolvedJavaMethod installedCodeOwner, StructuredGraph graph, boolean forceCompile, boolean installAsDefault, OptionValues options) {
109108
CompilationIdentifier compilation = new CompilationIdentifier() {
110109
@Override

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ protected void testConditionalElimination(String snippet, String referenceSnippe
6161
testConditionalElimination(snippet, referenceSnippet, false, false);
6262
}
6363

64-
@SuppressWarnings("try")
6564
protected void testConditionalElimination(String snippet, String referenceSnippet, boolean applyConditionalEliminationOnReference, boolean applyLowering) {
6665
StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES);
6766
DebugContext debug = graph.getDebug();

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ private static void test() {
7777

7878
}
7979

80-
@SuppressWarnings("try")
8180
private void test(final String snippet) {
8281
DebugContext debug = getDebugContext();
8382
try (DebugContext.Scope _ = debug.scope("DegeneratedLoopsTest", new DebugDumpScope(snippet))) {

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -41,7 +41,6 @@
4141
public final class DontReuseArgumentSpaceTest extends GraalCompilerTest {
4242

4343
@Override
44-
@SuppressWarnings("try")
4544
protected Suites createSuites(OptionValues options) {
4645
return super.createSuites(new OptionValues(options, HighTier.Options.Inline, false));
4746
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public static Object snippet() {
5151
return new String("snippet");
5252
}
5353

54-
@SuppressWarnings("try")
5554
@Test
5655
public void testDump() throws Exception {
5756
assumeManagementLibraryIsLoadable();

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ public DynamicConstantTest() {
209209

210210
private static final boolean VERBOSE = Boolean.getBoolean(DynamicConstantTest.class.getSimpleName() + ".verbose");
211211

212-
@SuppressWarnings("try")
213212
@Test
214213
public void test() throws Throwable {
215214
boolean jvmciCompatibilityChecked = false;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ protected void finalize() throws Throwable {
7070
}
7171
}
7272

73-
@SuppressWarnings("try")
7473
private StructuredGraph parseAndProcess(Class<?> cl, AllowAssumptions allowAssumptions) {
7574
Constructor<?>[] constructors = cl.getConstructors();
7675
Assert.assertTrue(constructors.length == 1);

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ private void testConstantReturn(String name, Object value) {
137137
assertDeepEquals(value, ret.result().asJavaConstant().asBoxedPrimitive());
138138
}
139139

140-
@SuppressWarnings("try")
141140
protected StructuredGraph buildGraph(final String snippet) {
142141
DebugContext debug = getDebugContext();
143142
try (DebugContext.Scope _ = debug.scope("InstanceOfTest", getMetaAccess().lookupJavaMethod(getMethod(snippet)))) {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ public void test1() {
6060
test("test1Snippet");
6161
}
6262

63-
@SuppressWarnings("try")
6463
private void test(final String snippet) {
6564
DebugContext debug = getDebugContext();
6665
try (DebugContext.Scope _ = debug.scope("FloatingReadTest", new DebugDumpScope(snippet))) {

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,6 @@ protected void assertEquals(StructuredGraph expected, StructuredGraph actual, bo
525525
* {@code actual} in its context so that these graphs are dumped when the comparison
526526
* fails and {@code DumpOnError=true}
527527
*/
528-
@SuppressWarnings("try")
529528
protected void assertEquals(StructuredGraph expected,
530529
StructuredGraph actual,
531530
boolean excludeVirtual,
@@ -1132,7 +1131,6 @@ protected final InstalledCode getCode(final ResolvedJavaMethod installedCodeOwne
11321131
* @param installAsDefault specifies whether to install as the default implementation
11331132
* @param options the options that will be used in {@link #parseForCompile(ResolvedJavaMethod)}
11341133
*/
1135-
@SuppressWarnings("try")
11361134
protected InstalledCode getCode(final ResolvedJavaMethod installedCodeOwner, StructuredGraph graph, boolean forceCompile, boolean installAsDefault, OptionValues options) {
11371135
boolean useCache = !forceCompile && getArgumentToBind() == null;
11381136
if (useCache && graph == null) {
@@ -1301,7 +1299,6 @@ protected final CompilationResult compile(ResolvedJavaMethod installedCodeOwner,
13011299
* {@link #parseForCompile(ResolvedJavaMethod)}.
13021300
* @param compilationId
13031301
*/
1304-
@SuppressWarnings("try")
13051302
protected CompilationResult compile(ResolvedJavaMethod installedCodeOwner, StructuredGraph graph, CompilationResult compilationResult, CompilationIdentifier compilationId, OptionValues options) {
13061303
StructuredGraph graphToCompile = graph == null ? parseForCompile(installedCodeOwner, compilationId, options) : graph;
13071304
lastCompiledGraph = graphToCompile;
@@ -1340,7 +1337,6 @@ protected StructuredGraph getFinalGraph(ResolvedJavaMethod method, OptionValues
13401337
return graph;
13411338
}
13421339

1343-
@SuppressWarnings("try")
13441340
protected void applyFrontEnd(StructuredGraph graph) {
13451341
DebugContext debug = graph.getDebug();
13461342
try (DebugContext.Scope _ = debug.scope("FrontEnd", graph)) {
@@ -1586,7 +1582,6 @@ public ProfilingInfo getProfilingInfo(ResolvedJavaMethod method, boolean include
15861582

15871583
};
15881584

1589-
@SuppressWarnings("try")
15901585
protected StructuredGraph parse(StructuredGraph.Builder builder, PhaseSuite<HighTierContext> graphBuilderSuite) {
15911586
ResolvedJavaMethod javaMethod = builder.getMethod();
15921587
builder.speculationLog(getSpeculationLog());

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -116,7 +116,6 @@ public void test06() {
116116
Assert.assertEquals(0, g.getNodes().filter(InvokeNode.class).count());
117117
}
118118

119-
@SuppressWarnings("try")
120119
private StructuredGraph buildGraphAfterMidTier(String name) {
121120
StructuredGraph g = parseForCompile(getResolvedJavaMethod(name));
122121
OptionValues options = getInitialOptions();

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public static Object allocate(int val) {
6161
return new TestClass(val + 2);
6262
}
6363

64-
@SuppressWarnings("try")
6564
private StructuredGraph getMidTierGraph(String snippet, Suites suites) {
6665
StructuredGraph g = parseEager(snippet, AllowAssumptions.NO, getInitialOptions());
6766
suites.getHighTier().apply(g, getDefaultHighTierContext());

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ public static void snippet02() {
196196
}
197197

198198
@Test
199-
@SuppressWarnings("try")
200199
public void testLoopDataStructure() {
201200
StructuredGraph g = parseEager(getResolvedJavaMethod("snippet02"), AllowAssumptions.NO);
202201
assert g.verify();

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/deopt/RethrowExceptionLoopTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -66,7 +66,6 @@ public static Object catchInLoop(Object object) {
6666
}
6767

6868
@Override
69-
@SuppressWarnings("try")
7069
protected Suites createSuites(OptionValues options) {
7170
return super.createSuites(new OptionValues(options, HighTier.Options.Inline, false));
7271
}

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/ea/PartialEscapeAnalysisTreesTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -107,12 +107,11 @@ public void testBuildTree() {
107107
* Prepare a graph that includes some blackholes and then remove the blackholes and compile
108108
* normally to create an unusual situation for PEA.
109109
*/
110-
@SuppressWarnings("try")
111110
public void testGraph(String name) {
112111
ResolvedJavaMethod method = getResolvedJavaMethod(name);
113112

114113
prepareGraph(name, true);
115-
try (DebugContext.Scope s = graph.getDebug().scope(getClass(), method, getCodeCache(), graph)) {
114+
try (DebugContext.Scope _ = graph.getDebug().scope(getClass(), method, getCodeCache(), graph)) {
116115
for (BlackholeNode node : graph.getNodes().filter(BlackholeNode.class)) {
117116
graph.removeFixed(node);
118117
}

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/inlining/InliningTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,10 @@ private static double callNonTrivial() {
216216
}
217217

218218
@Test
219-
@SuppressWarnings("try")
220219
public void testTracing() {
221220
OptionValues options = new OptionValues(getInitialOptions(), GraalOptions.TraceInlining, true);
222221
StructuredGraph graph;
223-
try (TTY.Filter f = new TTY.Filter()) {
222+
try (TTY.Filter _ = new TTY.Filter()) {
224223
graph = getGraph("traceInliningTest", options, false);
225224
}
226225
String inliningTree = graph.getInliningLog().formatAsTree(false);

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/debug/test/CompilationAlarmPhaseTimesTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -262,7 +262,6 @@ public void testExplicitly() {
262262

263263
}
264264

265-
@SuppressWarnings("try")
266265
private static StringBuilder runAndTrack(Runnable r) {
267266
// set the timeout very high, we just want to verify toString methods
268267
OptionValues opt = new OptionValues(getInitialOptions(), CompilationAlarm.Options.CompilationExpirationPeriod, Double.MAX_VALUE);

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/debug/test/DebugContextTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
import jdk.graal.compiler.options.OptionValues;
5959
import jdk.graal.compiler.serviceprovider.GraalServices;
6060

61-
@SuppressWarnings("try")
6261
public class DebugContextTest {
6362

6463
static class DebugContextSetup {
@@ -93,7 +92,7 @@ public void testDisabledScopes() {
9392
OptionValues options = new OptionValues(EconomicMap.create());
9493
DebugContextSetup setup = new DebugContextSetup();
9594
try (DebugContext debug = setup.openDebugContext(options);
96-
DebugContext.Scope d = debug.scope("TestDisabledScoping")) {
95+
DebugContext.Scope _ = debug.scope("TestDisabledScoping")) {
9796
for (int level = DebugContext.BASIC_LEVEL; level <= DebugContext.VERY_DETAILED_LEVEL; level++) {
9897
debug.dump(level, "an object", "at level %d", level);
9998
debug.verify("an object", "at level %d", level);

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/debug/test/TimerKeyTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
import org.junit.Before;
4242
import org.junit.Test;
4343

44-
@SuppressWarnings("try")
4544
public class TimerKeyTest {
4645

4746
@Before

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/graph/test/GraphNodeEventListenerTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ private static void resetListenersCalled() {
6363
}
6464

6565
@Test
66-
@SuppressWarnings("try")
6766
public void testAddRemove() {
6867
OptionValues options = getOptions();
6968
Graph graph = new Graph(options, getDebug(options));
@@ -82,7 +81,6 @@ public void testAddRemove() {
8281
}
8382

8483
@Test
85-
@SuppressWarnings("try")
8684
public void testAddRemoveUnstructured() {
8785
OptionValues options = getOptions();
8886
Graph graph = new Graph(options, getDebug(options));

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/hotspot/amd64/test/CompressedNullCheckTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,6 @@ public static void testSnippet(Container c) {
4646
c.i.intValue();
4747
}
4848

49-
@SuppressWarnings("try")
5049
private void testImplicit(Integer i) {
5150
Assume.assumeTrue(runtime().getVMConfig().useCompressedOops);
5251

@@ -64,7 +63,6 @@ private void testImplicit(Integer i) {
6463
assertEquals(expect, actual);
6564
}
6665

67-
@SuppressWarnings("try")
6866
private void testExplicit(Integer i) {
6967
Assume.assumeTrue(runtime().getVMConfig().useCompressedOops);
7068

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/hotspot/test/CheckGraalIntrinsics.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -145,7 +145,6 @@ public interface Refiner {
145145
public final UnimplementedGraalIntrinsics unimplementedGraalIntrinsics = new UnimplementedGraalIntrinsics(rt.getTarget().arch);
146146

147147
@Test
148-
@SuppressWarnings("try")
149148
public void test() throws ClassNotFoundException, NoSuchFieldException {
150149
HotSpotProviders providers = rt.getHostBackend().getProviders();
151150
Plugins graphBuilderPlugins = providers.getGraphBuilderPlugins();

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/hotspot/test/CompileTheWorld.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,6 @@ protected void handleFailure(HotSpotCompilationRequestResult result) {
971971
* Prepares a compilation of the methods in the classes in {@link #inputClassPath}. If
972972
* {@link #inputClassPath} equals {@link #SUN_BOOT_CLASS_PATH} the boot classes are used.
973973
*/
974-
@SuppressWarnings("try")
975974
public List<Compilation> prepare() throws IOException {
976975
String classPath = SUN_BOOT_CLASS_PATH.equals(inputClassPath) ? JRT_CLASS_PATH_ENTRY : inputClassPath;
977976
final String[] entries = getEntries(classPath);

0 commit comments

Comments
 (0)