Back to Intellij Community

StringTemplateMigration

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

2025.3-rc-2357 B
Original Source

Reports String concatenations that can be simplified by replacing them with a string template.

Example:

String name = "Bob";
  String greeting = "Hello, " + name + ". You are " + 29 + " years old.";

After the quick-fix is applied:

String name = "Bob";
  String greeting = STR."Hello, \{name}. You are 29 years old.";

New in 2023.3