A string or character literal spells a printable ASCII character as a Unicode escape

tx0/java:escaped-printable-charstrictwarningstyle/conventionsdepth faststyle

What it finds

"\u0041" is "A" written so that nobody can read it. Java turns Unicode escapes into characters before anything else, so the escape buys nothing for a printable ASCII character.

Reported is a literal with a Unicode escape of a character from space to ~, other than the quotes and the backslash, which would end or change the literal. The fix writes the characters.

From the rule's source, escaped_printable_char.rs.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/java:escaped-printable-char" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/java:escaped-printable-char] reason="..."

tx0 explain tx0/java:escaped-printable-char shows the same in the terminal. Found a false positive? Report it.