Back to Intellij Community

RedundantEmbeddedExpression

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

2025.3-rc-2264 B
Original Source

Reports redundant embedded expressions in STR templates, such as trivial literals or empty expressions.

Example:

System.out.println(STR."Hello \{"world"}");

After the quick-fix is applied:

System.out.println(STR."Hello world");

New in 2023.3