Open
Description
Description
This method accesses the value of a Map entry, using a key that was retrieved from a keySet
iterator. It is more efficient to use an iterator on the entrySet
of the map, to avoid the Map.get(key)
lookup.
Discussion
No response
Motivation
Perfomance optimization
Details
Consider using entrySet
instead of keySet
at the following cases:
Found by Linux Verification Center with SVACE
More similar cases:
#40064 (comment) - Thanks to @akbar1214 for his report