On Thu, 12 Jan 2023 01:50:51 GMT, Stuart Marks <sma...@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" ?

src/java.base/share/classes/java/util/Map.java line 421:

> 419:      * {@link Set#toArray toArray} overloads,
> 420:      * or by copying the entry-set view into another collection. It is 
> unspecified whether
> 421:      * the Entry instances thus obtained are connected to the underlying 
> map, whether

It might be a bit clear if tweaked to "whether the obtained Entry instances are 
connected".

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.

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

PR: https://git.openjdk.org/jdk/pull/11956

Reply via email to