Skip to content

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

Open
trly wants to merge 1 commit into
mainfrom
replace-wrapper-constructors-53910ef0-a945-4252-a20e-0913838d7800
Open

Replace primitive wrapper constructors with valueOf() factory methods#6
trly wants to merge 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.

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