Skip to content

Commit d2d708b

Browse files
committed
feat: Simplify expressions on streams checks
1 parent 7652b00 commit d2d708b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/tooling/leyden/commands/InfoCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public void count() {
7676

7777
private boolean shouldShow(String s) {
7878
return this.whatToShow.length == 0
79-
|| Arrays.stream(this.whatToShow).anyMatch(wts -> wts.equals(s));
79+
|| Arrays.asList(this.whatToShow).contains(s);
8080
}
8181

8282
private void print(String title, Configuration configuration) {

src/test/java/tooling/leyden/commands/logparser/AOTCacheParserTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ void acceptObjectsWithExplicitReference() {
196196

197197
assertEquals(3 + 1, information.getElements(null, null, null, true, false, "Class").count());
198198
information.getElements(null, null, null, true, false, "Class")
199-
.allMatch(c -> !((ClassObject) c).getSymbols().isEmpty());
199+
.noneMatch(c -> ((ClassObject) c).getSymbols().isEmpty());
200200

201201
//Make sure we didn'0t create unexpected assets in the cache:
202202
assertEquals(2 + 20 + 8 + 3 + 1, information.getAll().size());

0 commit comments

Comments
 (0)