Inspectopedia Help

Unnecessarily escaped character

Reports unnecessarily escaped characters in String and optionally char literals.

Escaped tab characters \t are not reported, because tab characters are invisible.


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

Here you can find the description of settings available for the Unnecessarily escaped character inspection, and the reference of their default values.

Report char literals

Not selected

Inspection Details

By default bundled with:

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin:

Java, 241.16690

Last modified: 29 April 2024