Polish "Use lambdas for map entry iteration where possible"
Closes gh-12626
This commit is contained in:
@@ -140,10 +140,11 @@ public final class Verify {
|
||||
}
|
||||
|
||||
private ZipEntry getEntryStartingWith(String entryName) {
|
||||
return this.content.entrySet().stream().
|
||||
filter(entry -> entry.getKey().startsWith(entryName)).
|
||||
map(Map.Entry::getValue).findFirst().orElseThrow(() ->
|
||||
new IllegalStateException("Unable to find entry starting with " + entryName));
|
||||
return this.content.entrySet().stream()
|
||||
.filter(entry -> entry.getKey().startsWith(entryName))
|
||||
.map(Map.Entry::getValue).findFirst()
|
||||
.orElseThrow(() -> new IllegalStateException(
|
||||
"Unable to find entry starting with " + entryName));
|
||||
}
|
||||
|
||||
public boolean hasEntry(String entry) {
|
||||
|
||||
Reference in New Issue
Block a user