Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to NullAway 0.10.24 and enable experimental JSpecify mode #1374

Merged
merged 10 commits into from
Mar 10, 2024
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
Loading