Skip to content

Commit 9f58f3d

Browse files
committed
hardening: null-safe mode check in isAdjacentStringConcat
The FeatureConfiguration seeds every configurable Feature with its declared default, so the mode is never null today; the guard keeps the predicate locally correct regardless.
1 parent d95c743 commit 9f58f3d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ public class CCJSqlParser extends AbstractJSqlParser<CCJSqlParser> {
11101110
*/
11111111
protected boolean isAdjacentStringConcat() {
11121112
String mode = getAsString(Feature.adjacentStringLiterals);
1113-
if (AdjacentStringLiterals.OFF.name().equals(mode)) {
1113+
if (mode == null || AdjacentStringLiterals.OFF.name().equals(mode)) {
11141114
return false;
11151115
}
11161116
if (getToken(1).kind != S_CHAR_LITERAL) {

0 commit comments

Comments
 (0)