Skip to content

Commit a10f5f3

Browse files
committed
[GR-60861] Update checkstyle to 10.21.0 in more suites and fixup.
PullRequest: graal/19745
2 parents 9c9d1d9 + f2dad77 commit a10f5f3

File tree

16 files changed

+43
-43
lines changed

16 files changed

+43
-43
lines changed

espresso/mx.espresso/suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
],
9393
"javaCompliance" : "8+",
9494
"checkstyle": "com.oracle.truffle.espresso.polyglot",
95-
"checkstyleVersion": "10.7.0",
95+
"checkstyleVersion": "10.21.0",
9696
"license": "UPL",
9797
},
9898

@@ -164,7 +164,7 @@
164164
"jacoco" : "include",
165165
"javaCompliance" : "17+",
166166
"checkstyle": "com.oracle.truffle.espresso",
167-
"checkstyleVersion": "10.7.0",
167+
"checkstyleVersion": "10.21.0",
168168
},
169169

170170
"com.oracle.truffle.espresso.resources.libs": {

espresso/src/com.oracle.truffle.espresso.classfile/src/com/oracle/truffle/espresso/classfile/attributes/LineNumberTableAttribute.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public int getLineNumber() {
128128
}
129129
}
130130

131-
private class ListWrapper extends AbstractList<Entry> {
131+
private final class ListWrapper extends AbstractList<Entry> {
132132
@Override
133133
public Entry get(int index) {
134134
if (index >= 0 && index < size()) {

espresso/src/com.oracle.truffle.espresso.polyglot/src/com/oracle/truffle/espresso/polyglot/TypeLiteral.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ private static Class<?> arrayTypeFromComponentType(Class<?> componentType) {
155155

156156
// only used by the VM internally
157157
@SuppressWarnings("unused")
158-
private class InternalTypeLiteral extends TypeLiteral<T> {
158+
private final class InternalTypeLiteral extends TypeLiteral<T> {
159159
}
160160
}
161161

espresso/src/com.oracle.truffle.espresso.polyglot/src/com/oracle/truffle/espresso/polyglot/collections/EspressoForeignList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public Iterator<T> iterator() {
164164
}
165165

166166
// Copied from AbstractList
167-
private class Itr implements Iterator<T> {
167+
private final class Itr implements Iterator<T> {
168168
/**
169169
* Index of element to be returned by subsequent call to next.
170170
*/

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/analysis/liveness/History.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public Iterable<Record> reverse() {
5656
return new ReverseIterator();
5757
}
5858

59-
private class OrderedIterator implements Iterator<Record> {
59+
private final class OrderedIterator implements Iterator<Record> {
6060
private int pos = 0;
6161

6262
@Override
@@ -70,7 +70,7 @@ public Record next() {
7070
}
7171
}
7272

73-
private class ReverseIterator implements Iterable<Record>, Iterator<Record> {
73+
private final class ReverseIterator implements Iterable<Record>, Iterator<Record> {
7474
private int pos = size - 1;
7575

7676
@Override

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/impl/LoadingConstraints.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ private static boolean exists(long klass) {
413413
return klass != NULL_KLASS_ID;
414414
}
415415

416-
private static class PurgeInfo {
416+
private static final class PurgeInfo {
417417
int reclaimedSlots = 0;
418418
int reclaimedConstraints = 0;
419419
int emptyBuckets = 0;

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/runtime/JDWPContextImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ public void registerExternalHotSwapHandler(StaticObject handler) {
943943
redefinitionPluginHandler.registerExternalHotSwapHandler(handler);
944944
}
945945

946-
private static class HierarchyComparator implements Comparator<ChangePacket> {
946+
private static final class HierarchyComparator implements Comparator<ChangePacket> {
947947
public int compare(ChangePacket packet1, ChangePacket packet2) {
948948
Klass k1 = packet1.info.getKlass();
949949
Klass k2 = packet2.info.getKlass();
@@ -972,7 +972,7 @@ public int compare(ChangePacket packet1, ChangePacket packet2) {
972972
}
973973
}
974974

975-
private static class SubClassHierarchyComparator implements Comparator<ObjectKlass> {
975+
private static final class SubClassHierarchyComparator implements Comparator<ObjectKlass> {
976976
public int compare(ObjectKlass k1, ObjectKlass k2) {
977977
// we need to do this check because isAssignableFrom is true in this case
978978
// and we would get an order that doesn't exist

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/reflect/ReflectionGraphKit.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ private ValueNode widenPrimitive(ValueNode unboxedValue, JavaKind fromKind, Java
291291
if (fromStackKind == toStackKind) {
292292
return unboxedValue;
293293
}
294-
// Checkstyle: stop
294+
// Checkstyle: stop FallThrough
295295
switch (fromStackKind) {
296296
case Int:
297297
switch (toStackKind) {
@@ -323,6 +323,6 @@ private ValueNode widenPrimitive(ValueNode unboxedValue, JavaKind fromKind, Java
323323
default:
324324
throw VMError.shouldNotReachHereUnexpectedInput(fromStackKind); // ExcludeFromJacocoGeneratedReport
325325
}
326-
// Checkstyle: resume
326+
// Checkstyle: resume FallThrough
327327
}
328328
}

sulong/mx.sulong/suite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@
486486
"jdk.unsupported", # sun.misc.Signal
487487
],
488488
"checkstyle" : "com.oracle.truffle.llvm.runtime",
489-
"checkstyleVersion" : "10.7.0",
489+
"checkstyleVersion" : "10.21.0",
490490
"annotationProcessors" : ["truffle:TRUFFLE_DSL_PROCESSOR"],
491491
"javaCompliance" : "17+",
492492
"spotbugsIgnoresGenerated" : True,

sulong/projects/com.oracle.truffle.llvm.runtime/src/com/oracle/truffle/llvm/runtime/ExportSymbolsMapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022, Oracle and/or its affiliates.
2+
* Copyright (c) 2022, 2025, Oracle and/or its affiliates.
33
*
44
* All rights reserved.
55
*
@@ -44,7 +44,7 @@ public abstract class ExportSymbolsMapper {
4444
*/
4545
public abstract void registerExports(LLVMScope fileScope, LLVMScope publicFileScope);
4646

47-
private static class Default extends ExportSymbolsMapper {
47+
private static final class Default extends ExportSymbolsMapper {
4848
@Override
4949
public void registerExports(LLVMScope fileScope, LLVMScope publicFileScope) {
5050
}

0 commit comments

Comments
 (0)