Skip to content

Use Map.forEach instead of manual Map.Entry iteration wherever possible [SPR-16646] #21187

@spring-projects-issues

Description

@spring-projects-issues

Juergen Hoeller opened SPR-16646 and commented

As a leftover of our general Java 8+ codebase revision and a follow-up to several recent polishing commits, one grand sweep is missing still: the use of Map.forEach instead of manual Map.Entry iteration in all places where no return clauses or checked exceptions are involved. That said, we do not switch to use of the Stream API for simple scenarios yet, just to streamlined map entry iteration for the time being.

Inspired by #1752, broadly applied to existing Map.Entry iteration cases as well.


Affects: 5.0.4

Issue Links:

Referenced from: commits e3d0ef6, 4aae6a6

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions