RFR: JDK-8263411: Convert jshell tool to use Stream.toList()

Ian Graves igraves at openjdk.java.net
Fri Mar 12 21:56:12 UTC 2021


This converts jshell from using `Stream.collect(Collectiors.toList())` to `Stream.toList()` - an immutable list with better performance characteristics. Local inspection only turned up one place that was mutating a resulting list and that has been refactored. 

This work is a subtask to: https://bugs.openjdk.java.net/browse/JDK-8260559

-------------

Commit messages:
 - Converting jshell to use Stream.toList

Changes: https://git.openjdk.java.net/jdk/pull/2979/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2979&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8263411
  Stats: 71 lines in 11 files changed: 3 ins; 12 del; 56 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2979.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2979/head:pull/2979

PR: https://git.openjdk.java.net/jdk/pull/2979


More information about the kulla-dev mailing list