Skip to content

Commit b1afc19

Browse files
msohngerritforge-ltd
authored andcommitted
Merge "RevWalk: use SystemReader instead of System.getProperty()"
2 parents ba209b9 + 9d48b26 commit b1afc19

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
import java.util.Iterator;
2525
import java.util.List;
2626
import java.util.Map;
27-
import java.util.
28-
Optional;
2927
import java.util.Set;
3028

3129
import org.eclipse.jgit.annotations.NonNull;
@@ -52,6 +50,7 @@
5250
import org.eclipse.jgit.revwalk.filter.RevFilter;
5351
import org.eclipse.jgit.treewalk.filter.TreeFilter;
5452
import org.eclipse.jgit.util.References;
53+
import org.eclipse.jgit.util.SystemReader;
5554

5655
/**
5756
* Walks a commit graph and produces the matching commits in order.
@@ -266,12 +265,9 @@ static DateRevQueue newDateRevQueue(Generator g) throws IOException {
266265
return new DateRevQueue(g);
267266
}
268267

269-
@SuppressWarnings("boxing")
270268
private static boolean usePriorityQueue() {
271-
return Optional
272-
.ofNullable(System.getProperty("REVWALK_USE_PRIORITY_QUEUE")) //$NON-NLS-1$
273-
.map(Boolean::parseBoolean)
274-
.orElse(false);
269+
return Boolean.parseBoolean(SystemReader.getInstance()
270+
.getProperty("REVWALK_USE_PRIORITY_QUEUE")); //$NON-NLS-1$
275271
}
276272

277273
/**

0 commit comments

Comments
 (0)