You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/10/29 09:13:21 UTC

[GitHub] [shardingsphere] terrymanu commented on a change in pull request #7957: minor refactoring for parser api

terrymanu commented on a change in pull request #7957:
URL: https://github.com/apache/shardingsphere/pull/7957#discussion_r514107166



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/exception/SQLParsingException.java
##########
@@ -24,7 +24,7 @@
     
     private static final long serialVersionUID = -6408790652103666096L;
     
-    public SQLParsingException(final String message, final Object... args) {
-        super(String.format(message, args));
+    public SQLParsingException(final String message) {

Review comment:
       Please revert this changes

##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-engine/src/main/java/org/apache/shardingsphere/sql/parser/core/visitor/SQLVisitorFactory.java
##########
@@ -62,7 +62,7 @@
             case RL:
                 return (ParseTreeVisitor) visitorFacade.getRLVisitorClass().getConstructor().newInstance();
             default:
-                throw new SQLParsingException("Can not support SQL statement type: `%s`", type);
+                throw new SQLParsingException(String.format("Can not support SQL statement type: `%s`", type));

Review comment:
       The SQLParsingException has already use String.format inside, it is unnecessary format string outside constructor




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org