RFR: 8038146: Clarify NavigableMap/TreeMap support for Entry.setValue
Stuart Marks
smarks at openjdk.org
Sat Jan 14 03:45:10 UTC 2023
On Fri, 13 Jan 2023 15:02:00 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Also additional verbiage regarding Map.Entry objects in general and their possible connection to an underlying Map.
>
> src/java.base/share/classes/java/util/Map.java line 405:
>
>> 403: * {@link Iterator} or implicitly via the enhanced {@code for} statement. This connection
>> 404: * to the backing map is valid <i>only</i> during iteration of the entry-set view. During
>> 405: * the iteration, if supported by the backing map, a change to a Entry's value via
>
> "a Entry's value" -> "an Entry's value" or "the value of an Entry" ?
Changed to "an Entry's Value".
> src/java.base/share/classes/java/util/NavigableMap.java line 80:
>
>> 78: * return {@link Map.Entry} instances that represent snapshots of mappings as
>> 79: * of the time of the call, and they do <em>not</em> support mutation of the
>> 80: * underlying map via the optional {@link Map.Entry#setValue setValue} method.
>
> I think it would be a bit more readable to put to break after "as of the time of the call", either a full stop or "; they". Same thing in TreeMap.
Done.
-------------
PR: https://git.openjdk.org/jdk/pull/11956
More information about the core-libs-dev
mailing list