Skip to content

Commit

Permalink
Update to NullAway 0.10.24 and enable experimental JSpecify mode (#1374)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
msridhar authored Mar 10, 2024
1 parent ae3b95d commit 45fa20f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ tasks.withType<JavaCompile>().configureEach {
error("NullAway")
errorproneArgs.addAll(
"-XepOpt:NullAway:AnnotatedPackages=com.ibm.wala",
"-XepOpt:NullAway:JSpecifyMode=true",
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 3 additions & 4 deletions util/src/main/java/com/ibm/wala/util/graph/GraphSlicer.java
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ public void removeNode(E n) {

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

private Set<E> getConnected(
@Nullable E inst, Function<E, Iterator<? extends E>> fconnected) {
private Set<E> getConnected(E inst, Function<E, Iterator<? extends E>> fconnected) {
Set<E> result = new LinkedHashSet<>();
Set<E> seenInsts = new HashSet<>();
Set<E> newInsts = Iterator2Collection.toSet(fconnected.apply(inst));
Expand All @@ -253,11 +252,11 @@ private Set<E> 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));
}

Expand Down
3 changes: 1 addition & 2 deletions util/src/main/java/com/ibm/wala/util/io/RtJar.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}));

Expand Down

0 comments on commit 45fa20f

Please sign in to comment.