Skip to content

use map.foreach directly instead of entrySet.foreach#16

Open
hduelme wants to merge 1 commit intomapstruct:mainfrom
hduelme:use-map.foreach-directly-instead-of-stream.foreach
Open

use map.foreach directly instead of entrySet.foreach#16
hduelme wants to merge 1 commit intomapstruct:mainfrom
hduelme:use-map.foreach-directly-instead-of-stream.foreach

Conversation

@hduelme
Copy link

@hduelme hduelme commented Feb 12, 2026

Since Map has a built-in forEach, we can avoid creating a stream and simplify this code by using map.forEach( (key, value) -> ) directly.

@hduelme hduelme changed the title use map.foreach directly instead of stream.foreach use map.foreach directly instead of entrySet.foreach Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant