This is an automated email from the ASF dual-hosted git repository.

zhaojinchao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new d8247463865 fix sonar issue (#30020)
d8247463865 is described below

commit d82474638654a78913abede926aebc9a962538d6
Author: Chuxin Chen <[email protected]>
AuthorDate: Tue Feb 6 18:12:15 2024 +0800

    fix sonar issue (#30020)
---
 .../mysql/visitor/statement/MySQLStatementVisitor.java      |  2 +-
 .../visitor/statement/type/MySQLDMLStatementVisitor.java    | 13 -------------
 2 files changed, 1 insertion(+), 14 deletions(-)

diff --git 
a/parser/sql/dialect/mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/MySQLStatementVisitor.java
 
b/parser/sql/dialect/mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/MySQLStatementVisitor.java
index a8320dd90a7..3e40e39a279 100644
--- 
a/parser/sql/dialect/mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/MySQLStatementVisitor.java
+++ 
b/parser/sql/dialect/mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/MySQLStatementVisitor.java
@@ -948,7 +948,7 @@ public abstract class MySQLStatementVisitor extends 
MySQLStatementBaseVisitor<AS
         return result;
     }
     
-    private Collection<ExpressionSegment> getExpressions(final 
List<ExprContext> exprList) {
+    protected Collection<ExpressionSegment> getExpressions(final 
List<ExprContext> exprList) {
         if (null == exprList) {
             return Collections.emptyList();
         }
diff --git 
a/parser/sql/dialect/mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/type/MySQLDMLStatementVisitor.java
 
b/parser/sql/dialect/mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/type/MySQLDMLStatementVisitor.java
index 050ceedb2f3..0ba7f25cab8 100644
--- 
a/parser/sql/dialect/mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/type/MySQLDMLStatementVisitor.java
+++ 
b/parser/sql/dialect/mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/type/MySQLDMLStatementVisitor.java
@@ -21,7 +21,6 @@ import org.apache.shardingsphere.sql.parser.api.ASTNode;
 import 
org.apache.shardingsphere.sql.parser.api.visitor.statement.type.DMLStatementVisitor;
 import 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.CallContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.DoStatementContext;
-import 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.ExprContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.HandlerStatementContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.ImportStatementContext;
 import 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser.IndexHintContext;
@@ -52,7 +51,6 @@ import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dml.MySQ
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
 
@@ -198,15 +196,4 @@ public final class MySQLDMLStatementVisitor extends 
MySQLStatementVisitor implem
         }
         return result;
     }
-    
-    private Collection<ExpressionSegment> getExpressions(final 
List<ExprContext> exprList) {
-        if (null == exprList) {
-            return Collections.emptyList();
-        }
-        Collection<ExpressionSegment> result = new 
ArrayList<>(exprList.size());
-        for (ExprContext each : exprList) {
-            result.add((ExpressionSegment) visit(each));
-        }
-        return result;
-    }
 }

Reply via email to