Skip to content

Replace primitive wrapper constructors with valueOf factory methods#4

Open
trly wants to merge 1 commit into
mainfrom
replace-wrapper-constructors-6aa85c17-c4fd-4136-8476-2c5ffff3b032
Open

Replace primitive wrapper constructors with valueOf factory methods#4
trly wants to merge 1 commit into
mainfrom
replace-wrapper-constructors-6aa85c17-c4fd-4136-8476-2c5ffff3b032

Conversation

@trly

@trly trly commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Replaces deprecated primitive wrapper constructors (e.g. new Boolean(true),
new Integer(42)) with the recommended .valueOf() factory methods across the
eight java.lang wrapper types (Boolean, Byte, Character, Short, Integer, Long,
Float, Double).

The wrapper constructors are deprecated for removal; valueOf() is the recommended
replacement and enables value caching.

References:

Created by Sourcegraph agentic batch change.

@trly trly marked this pull request as ready for review June 25, 2026 14:49
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