Inspectopedia Help

Unnecessarily escaped character

Reports unnecessarily escaped characters in String and optionally char literals.

The escaped tab character \t is not reported, because otherwise it will be invisible.

Examples:

String s = "\'Scare\' quotes"; String t = """ All you need is\n\tLove\n""";

After the quick-fix is applied:

String s = "'Scare' quotes"; String t = """ All you need is \tLove """;

New in 2019.3

Inspection options

Option

Type

Default

Report char literals

Checkbox

false

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023