Skip to content

Commit 4cbb5c6

Browse files
timfelfangerer
authored andcommitted
fix checkstyle issues
1 parent b751ce6 commit 4cbb5c6

15 files changed

+48
-34
lines changed

graalpython/com.oracle.graal.python/.checkstyle_checks.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
9393
</module>
9494
<module name="StaticVariableName">
95-
<property name="format" value="^[A-Za-z][a-zA-Z0-9]*$"/>
95+
<property name="format" value="^[A-Za-z][_a-zA-Z0-9]*$"/>
9696
</module>
9797
<module name="EmptyForInitializerPad"/>
9898
<module name="EmptyForIteratorPad"/>

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/TruffleCextBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ public static CheckFunctionResultNode create() {
683683
}
684684
}
685685

686-
static abstract class ExternalFunctionNode extends PRootNode {
686+
abstract static class ExternalFunctionNode extends PRootNode {
687687
private final Signature signature;
688688
private final TruffleObject cwrapper;
689689
private final TruffleObject callable;

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/CExtNodes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public static FloatSubtypeNew create() {
255255
}
256256

257257
// -----------------------------------------------------------------------------------------------------------------
258-
public static abstract class FromNativeSubclassNode extends CExtBaseNode {
258+
public abstract static class FromNativeSubclassNode extends CExtBaseNode {
259259

260260
public abstract Double execute(PythonNativeObject object);
261261

@@ -1636,7 +1636,7 @@ public static IsPointerNode getUncached() {
16361636

16371637
// -----------------------------------------------------------------------------------------------------------------
16381638
@GenerateUncached
1639-
public static abstract class GetObjectDictNode extends CExtBaseNode {
1639+
public abstract static class GetObjectDictNode extends CExtBaseNode {
16401640
public abstract Object execute(Object self);
16411641

16421642
@Specialization

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/InvalidateNativeObjectsAllManagedNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@ public static InvalidateNativeObjectsAllManagedNode create() {
8585
public static InvalidateNativeObjectsAllManagedNode getUncached() {
8686
return InvalidateNativeObjectsAllManagedUncachedNode.INSTANCE;
8787
}
88-
}
88+
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/PySequenceArrayWrapper.java

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -177,20 +177,27 @@ long doBytesI64(PIBytesLike bytesLike, long byteIdx,
177177
long result = 0;
178178
SequenceStorage store = profiled.getSequenceStorage();
179179
result |= castToByteNode.execute(getItemNode.execute(store, i));
180-
if (i + 1 < len)
180+
if (i + 1 < len) {
181181
result |= ((long) castToByteNode.execute(getItemNode.execute(store, i + 1)) << 8L) & 0xFF00L;
182-
if (i + 2 < len)
182+
}
183+
if (i + 2 < len) {
183184
result |= ((long) castToByteNode.execute(getItemNode.execute(store, i + 2)) << 16L) & 0xFF0000L;
184-
if (i + 3 < len)
185+
}
186+
if (i + 3 < len) {
185187
result |= ((long) castToByteNode.execute(getItemNode.execute(store, i + 3)) << 24L) & 0xFF000000L;
186-
if (i + 4 < len)
188+
}
189+
if (i + 4 < len) {
187190
result |= ((long) castToByteNode.execute(getItemNode.execute(store, i + 4)) << 32L) & 0xFF00000000L;
188-
if (i + 5 < len)
191+
}
192+
if (i + 5 < len) {
189193
result |= ((long) castToByteNode.execute(getItemNode.execute(store, i + 5)) << 40L) & 0xFF0000000000L;
190-
if (i + 6 < len)
194+
}
195+
if (i + 6 < len) {
191196
result |= ((long) castToByteNode.execute(getItemNode.execute(store, i + 6)) << 48L) & 0xFF000000000000L;
192-
if (i + 7 < len)
197+
}
198+
if (i + 7 < len) {
193199
result |= ((long) castToByteNode.execute(getItemNode.execute(store, i + 7)) << 56L) & 0xFF00000000000000L;
200+
}
194201
return result;
195202
}
196203

@@ -206,20 +213,27 @@ long doPMmapI64(PMMap mmap, long byteIdx,
206213
int i = (int) byteIdx;
207214
long result = 0;
208215
result |= castToByteNode.execute(callGetItemNode.execute(null, attrGetItem, mmap, byteIdx));
209-
if (i + 1 < len)
216+
if (i + 1 < len) {
210217
result |= ((long) castToByteNode.execute(callGetItemNode.execute(null, attrGetItem, mmap, byteIdx)) << 8L) & 0xFF00L;
211-
if (i + 2 < len)
218+
}
219+
if (i + 2 < len) {
212220
result |= ((long) castToByteNode.execute(callGetItemNode.execute(null, attrGetItem, mmap, byteIdx)) << 16L) & 0xFF0000L;
213-
if (i + 3 < len)
221+
}
222+
if (i + 3 < len) {
214223
result |= ((long) castToByteNode.execute(callGetItemNode.execute(null, attrGetItem, mmap, byteIdx)) << 24L) & 0xFF000000L;
215-
if (i + 4 < len)
224+
}
225+
if (i + 4 < len) {
216226
result |= ((long) castToByteNode.execute(callGetItemNode.execute(null, attrGetItem, mmap, byteIdx)) << 32L) & 0xFF00000000L;
217-
if (i + 5 < len)
227+
}
228+
if (i + 5 < len) {
218229
result |= ((long) castToByteNode.execute(callGetItemNode.execute(null, attrGetItem, mmap, byteIdx)) << 40L) & 0xFF0000000000L;
219-
if (i + 6 < len)
230+
}
231+
if (i + 6 < len) {
220232
result |= ((long) castToByteNode.execute(callGetItemNode.execute(null, attrGetItem, mmap, byteIdx)) << 48L) & 0xFF000000000000L;
221-
if (i + 7 < len)
233+
}
234+
if (i + 7 < len) {
222235
result |= ((long) castToByteNode.execute(callGetItemNode.execute(null, attrGetItem, mmap, byteIdx)) << 56L) & 0xFF00000000000000L;
236+
}
223237
return result;
224238
}
225239

@@ -393,7 +407,7 @@ protected static boolean isPSequence(Object obj) {
393407
}
394408

395409
@GenerateUncached
396-
static abstract class ToNativeStorageNode extends Node {
410+
abstract static class ToNativeStorageNode extends Node {
397411

398412
public abstract NativeSequenceStorage execute(SequenceStorage object);
399413

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/PythonClassInitNativeWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ public PythonClassInitNativeWrapper(PythonClass object) {
5757
public String toString() {
5858
return String.format("PythonClassNativeInitWrapper(%s, isNative=%s)", getPythonObject(), isNative());
5959
}
60-
}
60+
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/PythonNativeWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ public void setNativePointer(Object nativePointer) {
7575
public boolean isNative() {
7676
return nativePointer != null;
7777
}
78-
}
78+
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/TruffleObjectNativeWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ public static TruffleObjectNativeWrapper wrap(TruffleObject foreignObject) {
5252
assert !(foreignObject instanceof PythonNativeWrapper) : "attempting to wrap a native wrapper";
5353
return new TruffleObjectNativeWrapper(foreignObject);
5454
}
55-
}
55+
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/argument/CreateArgumentsNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ protected static ApplyPositionalArguments getUncached() {
448448
*/
449449
// TODO qualified name is a workaround for a DSL bug
450450
@com.oracle.truffle.api.dsl.GenerateUncached
451-
protected static abstract class ApplyKeywordsNode extends PNodeWithContext {
451+
protected abstract static class ApplyKeywordsNode extends PNodeWithContext {
452452
public abstract Object[] execute(Object callee, Signature calleeSignature, Object[] arguments, PKeyword[] keywords);
453453

454454
public static ApplyKeywordsNode create() {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/attributes/LookupAttributeInMRONode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static LookupAttributeInMRONode.Dynamic getUncached() {
7979
}
8080
}
8181

82-
static abstract class DynamicCached extends Dynamic {
82+
abstract static class DynamicCached extends Dynamic {
8383
@CompilationFinal private ContextReference<PythonContext> contextRef;
8484

8585
protected static boolean compareStrings(String key, String cachedKey) {

0 commit comments

Comments
 (0)