VisibilityChecker: use #areAllReachable with a stream of starters
The variant of #areAllReachable receiving the starters as a Collection
is deprecated. Use the suggested alternative that receive them as
Stream.
The deprecated version will be removed in JGit 7.0
Change-Id: If24e8f2c98edfdcfefc0c628c4c754709f54a5c5
diff --git a/java/com/google/gitiles/VisibilityChecker.java b/java/com/google/gitiles/VisibilityChecker.java
index fd81396..dedf547 100644
--- a/java/com/google/gitiles/VisibilityChecker.java
+++ b/java/com/google/gitiles/VisibilityChecker.java
@@ -68,8 +68,8 @@
return false;
}
- return !walk.createReachabilityChecker()
- .areAllReachable(ImmutableList.of(commit), startCommits)
+ return !walk.getObjectReader().createReachabilityChecker(walk)
+ .areAllReachable(ImmutableList.of(commit), startCommits.stream())
.isPresent();
}