← 返回首页
Underscore used as identifier — CodeQL query help documentation CodeQL docs
CodeQL documentation
CodeQL resources

Underscore used as identifier

ID: java/underscore-identifier Kind: problem Security severity: Severity: recommendation Precision: 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

The underscore character is a reserved keyword in Java 9 and therefore disallowed as a one-character identifier.

Recommendation

Rename any identifiers that consist of a one-character underscore.

References