Skip to content

Replace primitive wrapper constructors with valueOf() factory methods#6

Merged
trly merged 1 commit into
mainfrom
replace-wrapper-constructors-53910ef0-a945-4252-a20e-0913838d7800
Jul 14, 2026
Merged

Replace primitive wrapper constructors with valueOf() factory methods#6
trly merged 1 commit into
mainfrom
replace-wrapper-constructors-53910ef0-a945-4252-a20e-0913838d7800

Conversation

@trly

@trly trly commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Replaces deprecated primitive wrapper constructor calls (e.g. new Boolean(true))
with the recommended static factory methods (e.g. Boolean.valueOf(true)).

These constructors are deprecated for removal per JEP 390;
the factory methods are preferred because they can return cached instances and make
boxing intent explicit. See the Boolean(boolean) Javadoc.

Applies to Boolean, Byte, Character, Short, Integer, Long, Float, and Double.

Transformation performed mechanically with comby.

Created by Sourcegraph agentic batch change.

@trly
trly merged commit 662597b into main Jul 14, 2026
1 check passed
@trly
trly deleted the replace-wrapper-constructors-53910ef0-a945-4252-a20e-0913838d7800 branch July 14, 2026 19:36
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