diff --git a/cast/src/main/java/com/ibm/wala/cast/ipa/callgraph/MiscellaneousHacksContextSelector.java b/cast/src/main/java/com/ibm/wala/cast/ipa/callgraph/MiscellaneousHacksContextSelector.java index fd423eed1f..13cce9ec61 100644 --- a/cast/src/main/java/com/ibm/wala/cast/ipa/callgraph/MiscellaneousHacksContextSelector.java +++ b/cast/src/main/java/com/ibm/wala/cast/ipa/callgraph/MiscellaneousHacksContextSelector.java @@ -47,7 +47,7 @@ public MiscellaneousHacksContextSelector( for (String[] descr : descriptors) { switch (descr.length) { - // loader name, loader language, classname, method name, method descr + // loader name, loader language, classname, method name, method descr case 5: { ClassLoaderReference clr = @@ -67,7 +67,7 @@ public MiscellaneousHacksContextSelector( break; } - // classname, method name, method descr + // classname, method name, method descr case 3: { MethodReference ref = @@ -81,7 +81,7 @@ public MiscellaneousHacksContextSelector( break; } - // loader name, classname, meaning all methods of that class + // loader name, classname, meaning all methods of that class case 2: { IClass klass = @@ -100,7 +100,7 @@ public MiscellaneousHacksContextSelector( break; } - // classname, meaning all methods of that class + // classname, meaning all methods of that class case 1: { IClass klass = diff --git a/cast/src/main/java/com/ibm/wala/cast/util/CAstPrinter.java b/cast/src/main/java/com/ibm/wala/cast/util/CAstPrinter.java index 0694b409b1..c8c7cf0f59 100644 --- a/cast/src/main/java/com/ibm/wala/cast/util/CAstPrinter.java +++ b/cast/src/main/java/com/ibm/wala/cast/util/CAstPrinter.java @@ -53,7 +53,7 @@ public static String kindAsString(int kind) { public String getKindAsString(int kind) { switch (kind) { - // statements + // statements case CAstNode.SWITCH: return "SWITCH"; case CAstNode.LOOP: @@ -107,7 +107,7 @@ public String getKindAsString(int kind) { case CAstNode.FORIN_LOOP: return "FOR..IN"; - // expression kinds + // expression kinds case CAstNode.FUNCTION_EXPR: return "FUNCTION_EXPR"; case CAstNode.EXPR_LIST: @@ -169,19 +169,19 @@ public String getKindAsString(int kind) { case CAstNode.NARY_EXPR: return "NARY_EXPR"; - // explicit lexical scopes + // explicit lexical scopes case CAstNode.LOCAL_SCOPE: return "SCOPE"; case CAstNode.SPECIAL_PARENT_SCOPE: return "SPECIAL PARENT SCOPE"; - // literal expression kinds + // literal expression kinds case CAstNode.CONSTANT: return "CONSTANT"; case CAstNode.OPERATOR: return "OPERATOR"; - // special stuff + // special stuff case CAstNode.PRIMITIVE: return "PRIMITIVE"; case CAstNode.VOID: diff --git a/core/src/main/java/com/ibm/wala/classLoader/JavaLanguage.java b/core/src/main/java/com/ibm/wala/classLoader/JavaLanguage.java index cb7c3a45ab..3beeb6faa9 100644 --- a/core/src/main/java/com/ibm/wala/classLoader/JavaLanguage.java +++ b/core/src/main/java/com/ibm/wala/classLoader/JavaLanguage.java @@ -701,11 +701,11 @@ public Collection getImplicitExceptionTypes(IInstruction pei) { case OP_invokeinterface: case OP_monitorenter: case OP_monitorexit: - // we're currently ignoring MonitorStateExceptions, since J2EE stuff - // should be - // logically single-threaded + // we're currently ignoring MonitorStateExceptions, since J2EE stuff + // should be + // logically single-threaded case OP_athrow: - // N.B: the caller must handle the explicitly-thrown exception + // N.B: the caller must handle the explicitly-thrown exception case OP_arraylength: return getNullPointerException(); case OP_idiv: diff --git a/core/src/main/java/com/ibm/wala/ipa/slicer/HeapReachingDefs.java b/core/src/main/java/com/ibm/wala/ipa/slicer/HeapReachingDefs.java index cb8e53f7cb..014a1a70d8 100644 --- a/core/src/main/java/com/ibm/wala/ipa/slicer/HeapReachingDefs.java +++ b/core/src/main/java/com/ibm/wala/ipa/slicer/HeapReachingDefs.java @@ -417,7 +417,7 @@ OrdinalSet computeResult( } } case HEAP_PARAM_CALLEE: - // no statements in this method will def the heap being passed in + // no statements in this method will def the heap being passed in case NORMAL_RET_CALLEE: case NORMAL_RET_CALLER: case PARAM_CALLEE: diff --git a/core/src/main/java/com/ibm/wala/ipa/slicer/SliceFunctions.java b/core/src/main/java/com/ibm/wala/ipa/slicer/SliceFunctions.java index 9a479ce70a..f674783555 100644 --- a/core/src/main/java/com/ibm/wala/ipa/slicer/SliceFunctions.java +++ b/core/src/main/java/com/ibm/wala/ipa/slicer/SliceFunctions.java @@ -34,7 +34,7 @@ public IUnaryFlowFunction getCallNoneToReturnFlowFunction(Statement src, Stateme case NORMAL_RET_CALLER: case PARAM_CALLER: case EXC_RET_CALLER: - // uh oh. anything that flows into the missing function will be killed. + // uh oh. anything that flows into the missing function will be killed. case NORMAL: // only control dependence flows into the missing function. // this control dependence does not flow back to the caller. diff --git a/dalvik/src/main/java/com/ibm/wala/dalvik/classLoader/DexCFG.java b/dalvik/src/main/java/com/ibm/wala/dalvik/classLoader/DexCFG.java index ff4a55cefb..322d7cc641 100644 --- a/dalvik/src/main/java/com/ibm/wala/dalvik/classLoader/DexCFG.java +++ b/dalvik/src/main/java/com/ibm/wala/dalvik/classLoader/DexCFG.java @@ -410,7 +410,7 @@ public Collection getImplicitExceptionTypes(Instruction pei) { throw new IllegalArgumentException("pei is null"); } switch (pei.getOpcode()) { - // TODO: Make sure all the important cases and exceptions are covered. + // TODO: Make sure all the important cases and exceptions are covered. case AGET: case AGET_WIDE: case AGET_OBJECT: @@ -418,17 +418,17 @@ public Collection getImplicitExceptionTypes(Instruction pei) { case AGET_BYTE: case AGET_CHAR: case AGET_SHORT: - // case OP_iaload: - // case OP_laload: - // case OP_faload: - // case OP_daload: - // case OP_aaload: - // case OP_baload: - // case OP_caload: - // case OP_saload: + // case OP_iaload: + // case OP_laload: + // case OP_faload: + // case OP_daload: + // case OP_aaload: + // case OP_baload: + // case OP_caload: + // case OP_saload: case APUT: case APUT_WIDE: - // case APUT_OBJECT: + // case APUT_OBJECT: case APUT_BOOLEAN: case APUT_BYTE: case APUT_CHAR: @@ -451,7 +451,7 @@ public Collection getImplicitExceptionTypes(Instruction pei) { case IGET_BYTE: case IGET_CHAR: case IGET_SHORT: - // case OP_getfield: + // case OP_getfield: case IPUT: case IPUT_WIDE: case IPUT_OBJECT: @@ -459,31 +459,31 @@ public Collection getImplicitExceptionTypes(Instruction pei) { case IPUT_BYTE: case IPUT_CHAR: case IPUT_SHORT: - // case OP_putfield: + // case OP_putfield: - // Shrike imp does not include the static invoke calls, so likewise will do the same + // Shrike imp does not include the static invoke calls, so likewise will do the same case INVOKE_VIRTUAL: case INVOKE_SUPER: case INVOKE_DIRECT: - // case INVOKE_STATIC: + // case INVOKE_STATIC: case INVOKE_INTERFACE: case INVOKE_VIRTUAL_RANGE: case INVOKE_SUPER_RANGE: case INVOKE_DIRECT_RANGE: - // case INVOKE_STATIC_RANGE: + // case INVOKE_STATIC_RANGE: case INVOKE_INTERFACE_RANGE: - // case OP_invokevirtual: - // case OP_invokespecial: - // case OP_invokeinterface: + // case OP_invokevirtual: + // case OP_invokespecial: + // case OP_invokeinterface: case ARRAY_LENGTH: - // case OP_arraylength: + // case OP_arraylength: case MONITOR_ENTER: case MONITOR_EXIT: - // case OP_monitorenter: - // case OP_monitorexit: - // we're currently ignoring MonitorStateExceptions, since J2EE stuff - // should be - // logically single-threaded + // case OP_monitorenter: + // case OP_monitorexit: + // we're currently ignoring MonitorStateExceptions, since J2EE stuff + // should be + // logically single-threaded case THROW: // case OP_athrow: // N.B: the caller must handle the explicitly-thrown exception @@ -519,12 +519,12 @@ public Collection getImplicitExceptionTypes(Instruction pei) { // case OP_checkcast: return JavaLanguage.getClassCastException(); - // I Don't think dalvik has to worry about this? - // case OP_ldc_w: - // if (((ConstantInstruction) pei).getType().equals(TYPE_Class)) - // return JavaLanguage.getClassNotFoundException(); - // else - // return null; + // I Don't think dalvik has to worry about this? + // case OP_ldc_w: + // if (((ConstantInstruction) pei).getType().equals(TYPE_Class)) + // return JavaLanguage.getClassNotFoundException(); + // else + // return null; case SGET: case SGET_BOOLEAN: diff --git a/dalvik/src/main/java/com/ibm/wala/dalvik/classLoader/DexIMethod.java b/dalvik/src/main/java/com/ibm/wala/dalvik/classLoader/DexIMethod.java index 10bce03279..98be8436c0 100644 --- a/dalvik/src/main/java/com/ibm/wala/dalvik/classLoader/DexIMethod.java +++ b/dalvik/src/main/java/com/ibm/wala/dalvik/classLoader/DexIMethod.java @@ -1367,7 +1367,7 @@ public void visit(Visitor visitor) { this)); break; } - // TODO: FILLED ARRAYS + // TODO: FILLED ARRAYS case FILLED_NEW_ARRAY: { int registerCount = ((Instruction35c) inst).getRegisterCount(); diff --git a/dalvik/src/main/java/com/ibm/wala/dalvik/dex/instructions/UnaryOperation.java b/dalvik/src/main/java/com/ibm/wala/dalvik/dex/instructions/UnaryOperation.java index 5fc92ade79..a745ba4906 100644 --- a/dalvik/src/main/java/com/ibm/wala/dalvik/dex/instructions/UnaryOperation.java +++ b/dalvik/src/main/java/com/ibm/wala/dalvik/dex/instructions/UnaryOperation.java @@ -146,7 +146,7 @@ public boolean isMove() { public IOperator getOperator() { switch (op) { - // SSA unary ops + // SSA unary ops case NOT: case NOTLONG: case NOTINT: diff --git a/dalvik/src/main/java/com/ibm/wala/dalvik/ipa/callgraph/propagation/cfa/IntentContextInterpreter.java b/dalvik/src/main/java/com/ibm/wala/dalvik/ipa/callgraph/propagation/cfa/IntentContextInterpreter.java index 995875df85..87f01d4443 100644 --- a/dalvik/src/main/java/com/ibm/wala/dalvik/ipa/callgraph/propagation/cfa/IntentContextInterpreter.java +++ b/dalvik/src/main/java/com/ibm/wala/dalvik/ipa/callgraph/propagation/cfa/IntentContextInterpreter.java @@ -208,9 +208,9 @@ public IR getIR(CGNode node) { break; case STANDARD_ACTION: - // TODO! - // In Order to correctly evaluate a standard-action we would also have to look - // at the URI of the Intent. + // TODO! + // In Order to correctly evaluate a standard-action we would also have to look + // at the URI of the Intent. case UNKNOWN_TARGET: info = intentStarters.getInfo(method.getReference()); diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0d43fd37ac..f03e53adac 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] eclipse = "4.30.0" eclipse-wst-jsdt = "1.0.201.v2010012803" -google-java-format = "1.17.0" +google-java-format = "1.24.0" ktfmt = "0.44" spotless = "6.25.0" diff --git a/shrike/src/main/java/com/ibm/wala/shrike/shrikeBT/Compiler.java b/shrike/src/main/java/com/ibm/wala/shrike/shrikeBT/Compiler.java index 48cb65d2b6..c3003c7aa7 100644 --- a/shrike/src/main/java/com/ibm/wala/shrike/shrikeBT/Compiler.java +++ b/shrike/src/main/java/com/ibm/wala/shrike/shrikeBT/Compiler.java @@ -604,7 +604,7 @@ public void visitSwap(SwapInstruction instruction) { if (!fallToConditional) { break; } - // $FALL-THROUGH$ + // $FALL-THROUGH$ case OP_aconst_null: if (!fallToConditional && inBasicBlock(i, 2) @@ -620,8 +620,8 @@ && inBasicBlock(i, 2) if (!fallToConditional) { break; } - // by Xiangyu - // $FALL-THROUGH$ + // by Xiangyu + // $FALL-THROUGH$ case OP_ifeq: case OP_ifge: case OP_ifgt: @@ -675,7 +675,7 @@ && inBasicBlock(i, 2) } break; } - // by Xiangyu + // by Xiangyu case OP_if_icmpeq: case OP_if_icmpge: @@ -866,7 +866,7 @@ && inBasicBlock(i, 2) break; } } - // $FALL-THROUGH$ + // $FALL-THROUGH$ case OP_lload: case OP_fload: case OP_dload: diff --git a/shrike/src/main/java/com/ibm/wala/shrike/shrikeCT/TypeAnnotationsReader.java b/shrike/src/main/java/com/ibm/wala/shrike/shrikeCT/TypeAnnotationsReader.java index 0ec2fdc429..623caf0878 100644 --- a/shrike/src/main/java/com/ibm/wala/shrike/shrikeCT/TypeAnnotationsReader.java +++ b/shrike/src/main/java/com/ibm/wala/shrike/shrikeCT/TypeAnnotationsReader.java @@ -255,15 +255,15 @@ private Pair getTypeAnnotationTargetAndSize( return Pair.make( new ThrowsTarget(exceptionReader.getClasses()[throwsIndex]), 2); } - /* - * localvar_target { - * u2 table_length; - * { u2 start_pc; - u2 length; - u2 index; - * } table[table_length]; - * } - */ + /* + * localvar_target { + * u2 table_length; + * { u2 start_pc; + u2 length; + u2 index; + * } table[table_length]; + * } + */ case localvar_target: { checkSize(begin, 2); diff --git a/util/src/main/java/com/ibm/wala/util/io/RtJar.java b/util/src/main/java/com/ibm/wala/util/io/RtJar.java index 2517035247..7ee632986a 100644 --- a/util/src/main/java/com/ibm/wala/util/io/RtJar.java +++ b/util/src/main/java/com/ibm/wala/util/io/RtJar.java @@ -24,7 +24,7 @@ public static JarFile getRtJar(Iterator x) { return JF; case "classes.jar": if (PlatformUtil.onMacOSX()) return JF; - // $FALL-THROUGH$ + // $FALL-THROUGH$ default: } }