JDK-8184690 : add Collectors for collecting into unmodifiable List, Set, and Map
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util.stream
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-07-14
  • Updated: 2017-12-07
  • Resolved: 2017-12-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10
10 b35Fixed
Related Reports
Relates :  
Relates :  
Description
Add Collector implementations that collect into the unmodifiable List, Set, and Map implementations that are currently returned by List.of(), Set.of(), and Map.of().

On Collectors:

toUnmodifiableList()
toUnmodifiableSet()
toUnmodifiableMap(keyFunc, valueFunc)
toUnmodifiableMap(keyFunc, valueFunc, mergeFunc)

Comments
This enhancement is being delivered in the same changeset as enhancement JDK-8177290 (copy factory methods). A single CSR (JDK-8191517) will cover both enhancements.
18-11-2017