Back to Intellij Community

HardCodedStringLiteral

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

2025.3-rc-2340 B
Original Source

Reports any instances of hardcoded String literals.

Hardcoded String literals are probably errors in an internationalized environment. This inspection won't report empty strings and strings consisting only of whitespaces. A quick-fix is available to transform a string literal into a java.util.ResourceBundle.getString() method call.