Text of codeql.github.com › codeql-query-help › java › java-missing-space-in-concatenation as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

Missing space in string literal — CodeQL query help documentation

CodeQL query help documentation » CodeQL query help for Java and Kotlin » Missing space in string literal ¶ ID: java/missing-space-in-concatenation Kind: problem Security severity: Severity: recommendation Precision: very-high Tags: - quality - maintainability - readability Query suites: - java-code-quality.qls - java-security-and-quality.qls Click to see the query in the CodeQL repository Splitting a long string literal over multiple lines can often aid readability, but this also makes it difficult to notice whether a space is missing where the strings are concatenated.

Recommendation ¶ Check the string literal to see whether it has the intended text. In particular, look for missing spaces near line breaks. Example ¶ The following example shows a text literal that is split over two lines and omits a space character between the two words at the line break. String s = "This text is" + "missing a space." ; References ¶ Java Language Specification: String Literals . © GitHub, Inc. Terms Privacy