diff --git a/build-logic/src/main/kotlin/com/ibm/wala/gradle/NullAway.gradle.kts b/build-logic/src/main/kotlin/com/ibm/wala/gradle/NullAway.gradle.kts index f68f4abd5b..0ac94b2a68 100644 --- a/build-logic/src/main/kotlin/com/ibm/wala/gradle/NullAway.gradle.kts +++ b/build-logic/src/main/kotlin/com/ibm/wala/gradle/NullAway.gradle.kts @@ -17,8 +17,8 @@ tasks.withType().configureEach { if (!name.contains("test", true)) { error("NullAway") errorproneArgs.addAll( - "-XepOpt:NullAway:AnnotatedPackages=com.ibm.wala", - "-XepOpt:NullAway:JSpecifyMode=true", + "-XepOpt:NullAway:AnnotatedPackages=com.ibm.wala", + "-XepOpt:NullAway:JSpecifyMode=true", ) } } diff --git a/util/src/main/java/com/ibm/wala/util/graph/GraphSlicer.java b/util/src/main/java/com/ibm/wala/util/graph/GraphSlicer.java index 8972c6c4c7..bd7049886e 100644 --- a/util/src/main/java/com/ibm/wala/util/graph/GraphSlicer.java +++ b/util/src/main/java/com/ibm/wala/util/graph/GraphSlicer.java @@ -226,8 +226,7 @@ public void removeNode(E n) { private final Map> preds = new HashMap<>(); - private Set getConnected( - @Nullable E inst, Function> fconnected) { + private Set getConnected(E inst, Function> fconnected) { Set result = new LinkedHashSet<>(); Set seenInsts = new HashSet<>(); Set newInsts = Iterator2Collection.toSet(fconnected.apply(inst)); @@ -253,11 +252,11 @@ private Set getConnected( return result; } - private void setPredNodes(@Nullable E N) { + private void setPredNodes(E N) { preds.put(N, getConnected(N, G::getPredNodes)); } - private void setSuccNodes(@Nullable E N) { + private void setSuccNodes(E N) { succs.put(N, getConnected(N, G::getSuccNodes)); } 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 94cb0e90bc..2517035247 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 @@ -45,8 +45,7 @@ public static void main(String[] args) { try { return new JarFile(object); } catch (IOException e) { - assert false : e.toString(); - return null; + throw new RuntimeException(e); } }));