Skip to content

Commit 45fa20f

Browse files
authored
Update to NullAway 0.10.24 and enable experimental JSpecify mode (#1374)
NullAway's JSpecify mode does greater checking around generic types. It is still experimental, but I will ensure that future fixes in JSpecify mode won't break WALA's build.
1 parent ae3b95d commit 45fa20f

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

build-logic/src/main/kotlin/com/ibm/wala/gradle/NullAway.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ tasks.withType<JavaCompile>().configureEach {
1818
error("NullAway")
1919
errorproneArgs.addAll(
2020
"-XepOpt:NullAway:AnnotatedPackages=com.ibm.wala",
21+
"-XepOpt:NullAway:JSpecifyMode=true",
2122
)
2223
}
2324
}

gradle/libs.versions.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine" }
3636
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params" }
3737
junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher" }
3838
junit-vintage-engine = { module = "org.junit.vintage:junit-vintage-engine" }
39-
nullaway = "com.uber.nullaway:nullaway:0.10.23"
39+
nullaway = "com.uber.nullaway:nullaway:0.10.24"
4040
rhino = "org.mozilla:rhino:1.7.14"
4141
slf4j-api = "org.slf4j:slf4j-api:2.0.7"
4242
w3c-css-sac = "org.eclipse.birt.runtime:org.w3c.css.sac:1.3.1.v200903091627"

util/src/main/java/com/ibm/wala/util/graph/GraphSlicer.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,7 @@ public void removeNode(E n) {
226226

227227
private final Map<E, Collection<E>> preds = new HashMap<>();
228228

229-
private Set<E> getConnected(
230-
@Nullable E inst, Function<E, Iterator<? extends E>> fconnected) {
229+
private Set<E> getConnected(E inst, Function<E, Iterator<? extends E>> fconnected) {
231230
Set<E> result = new LinkedHashSet<>();
232231
Set<E> seenInsts = new HashSet<>();
233232
Set<E> newInsts = Iterator2Collection.toSet(fconnected.apply(inst));
@@ -253,11 +252,11 @@ private Set<E> getConnected(
253252
return result;
254253
}
255254

256-
private void setPredNodes(@Nullable E N) {
255+
private void setPredNodes(E N) {
257256
preds.put(N, getConnected(N, G::getPredNodes));
258257
}
259258

260-
private void setSuccNodes(@Nullable E N) {
259+
private void setSuccNodes(E N) {
261260
succs.put(N, getConnected(N, G::getSuccNodes));
262261
}
263262

util/src/main/java/com/ibm/wala/util/io/RtJar.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ public static void main(String[] args) {
4545
try {
4646
return new JarFile(object);
4747
} catch (IOException e) {
48-
assert false : e.toString();
49-
return null;
48+
throw new RuntimeException(e);
5049
}
5150
}));
5251

0 commit comments

Comments
 (0)