Skip to content

Commit 6776173

Browse files
committed
subsequent steps fused into stream api chains
1 parent cde43bc commit 6776173

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

java/src/org/openqa/selenium/JavascriptExecutor.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,8 @@ default void unpin(ScriptKey key) {
177177
* @return The {@link ScriptKey}s of all currently pinned scripts.
178178
*/
179179
default Set<ScriptKey> getPinnedScripts() {
180-
return Collections.unmodifiableSet(
181-
UnpinnedScriptKey.getPinnedScripts(this).stream()
182-
.map(key -> (ScriptKey) key)
183-
.collect(Collectors.toSet()));
180+
return UnpinnedScriptKey.getPinnedScripts(this).stream()
181+
.map(key -> (ScriptKey) key).collect(Collectors.toUnmodifiableSet());
184182
}
185183

186184
/**

java/src/org/openqa/selenium/logging/LogEntries.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class LogEntries implements Iterable<LogEntry> {
3636

3737
public LogEntries(Iterable<LogEntry> entries) {
3838
this.entries =
39-
unmodifiableList(StreamSupport.stream(entries.spliterator(), false).collect(toList()));
39+
StreamSupport.stream(entries.spliterator(), false).toList();
4040
}
4141

4242
/**

0 commit comments

Comments
 (0)