There is no need to use a temporary Vector within the constructor of SynchronizedInputStream, as more efficient (non-synchronized) alternative code (like List.of) will do the same in possibly less time. While the optimization is not dramatic, it still makes sense to replace Vector unless synchronization is really needed.
------------- Commit messages: - Replacing Vector by List.of Changes: https://git.openjdk.org/jdk/pull/11249/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11249&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8297299 Stats: 8 lines in 1 file changed: 2 ins; 4 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/11249.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11249/head:pull/11249 PR: https://git.openjdk.org/jdk/pull/11249