Skip to content

java.source.base: Collection/Stream focused code renovation - #9553

Open
mbien wants to merge 1 commit into
apache:masterfrom
mbien:java-source-base-renovation
Open

java.source.base: Collection/Stream focused code renovation#9553
mbien wants to merge 1 commit into
apache:masterfrom
mbien:java-source-base-renovation

Conversation

@mbien

@mbien mbien commented Aug 10, 2026

Copy link
Copy Markdown
Member

Use potentially more efficient shortcuts like getFirst/Last(), reversed(), computeIfAbsent(), removeIf(), toList() etc.

Remove redundant calls (e.g stream().forEach()) or dead code.

Refactored using jackpot scripts but checked hits for side effects.

Use potentially more efficient shortcuts like getFirst/Last(),
reversed(), computeIfAbsent(), removeIf(), toList() etc.

Remove redundant calls (e.g stream().forEach()) or dead code.
@mbien mbien added this to the NB32 milestone Aug 10, 2026
@mbien mbien added Code cleanup Label for cleanup done on the Netbeans IDE Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) labels Aug 10, 2026
Comment on lines -197 to -198
//J2ME preprocessor support
private final FilterListener filterListener;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this field was never read after init -> removed dead code paths

@mbien
mbien requested review from dbalek and lahodaj August 10, 2026 22:51
@mbien

mbien commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

@lkishalmi @matthiasblaesing anyone else wants to take a quick look at this?

@matthiasblaesing matthiasblaesing left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane to me. Some of the changes I would not have a applied (for example moving from String#format to String#formatted, but overall this looks like a sane cleanup.

@mbien

mbien commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

thanks for checking, going to go through it again myself and rebase before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code cleanup Label for cleanup done on the Netbeans IDE Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants