Inspectopedia Help

Hardcoded line separator

Reports linefeed (\n) and carriage return (\r) character escape sequences used in string literals, character literals or text blocks. These characters are commonly used as line separators, and portability may suffer if they are hardcoded.

Example:

String count = "first\nsecond\rthird";

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023