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 2fff53f282..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 @@ -18,6 +18,7 @@ tasks.withType().configureEach { error("NullAway") errorproneArgs.addAll( "-XepOpt:NullAway:AnnotatedPackages=com.ibm.wala", + "-XepOpt:NullAway:JSpecifyMode=true", ) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1040d3a6d7..df31d3fc02 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -36,7 +36,7 @@ junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine" } junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params" } junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher" } junit-vintage-engine = { module = "org.junit.vintage:junit-vintage-engine" } -nullaway = "com.uber.nullaway:nullaway:0.10.23" +nullaway = "com.uber.nullaway:nullaway:0.10.24" rhino = "org.mozilla:rhino:1.7.14" slf4j-api = "org.slf4j:slf4j-api:2.0.7" w3c-css-sac = "org.eclipse.birt.runtime:org.w3c.css.sac:1.3.1.v200903091627" 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); } }));