Back to Intellij Community

UnnecessaryTemporaryOnConversionFromString

java/java-impl/resources/inspectionDescriptions/UnnecessaryTemporaryOnConversionFromString.html

2025.3-rc-2213 B
Original Source

Reports unnecessary creation of temporary objects when converting from String to primitive types.

Example:

new Integer("3").intValue()

After the quick-fix is applied:

Integer.valueOf("3")