You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by su...@apache.org on 2022/11/12 11:54:43 UTC

[shardingsphere] branch master updated: Refactor DynamicSQLCaseLocalLoader (#22111)

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

sunnianjun 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 44d43ec2d02 Refactor DynamicSQLCaseLocalLoader (#22111)
44d43ec2d02 is described below

commit 44d43ec2d02134f56c941c8dcab0a0bf6cdc5613
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sat Nov 12 19:54:37 2022 +0800

    Refactor DynamicSQLCaseLocalLoader (#22111)
---
 .../sql/parser/loader/DynamicSQLCaseLocalLoader.java              | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/sql/parser/loader/DynamicSQLCaseLocalLoader.java b/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/sql/parser/loader/DynamicSQLCaseLocalLoader.java
index 7d0d59668b9..e0bb16c7cab 100644
--- a/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/sql/parser/loader/DynamicSQLCaseLocalLoader.java
+++ b/test/integration-test/sql-parser/src/test/java/org/apache/shardingsphere/sql/parser/loader/DynamicSQLCaseLocalLoader.java
@@ -24,7 +24,10 @@ import java.net.URI;
 import java.util.Collection;
 import java.util.LinkedList;
 
-public class DynamicSQLCaseLocalLoader extends DynamicLoadingSQLParserParameterizedTest implements DynamicSQLCaseLoaderStrategy {
+/**
+ * Dynamic SQL case local loader.
+ */
+public final class DynamicSQLCaseLocalLoader extends DynamicLoadingSQLParserParameterizedTest implements DynamicSQLCaseLoaderStrategy {
     
     public DynamicSQLCaseLocalLoader() {
         super("", "", "", new SQLParserCSVResultProcessor(""));
@@ -40,8 +43,7 @@ public class DynamicSQLCaseLocalLoader extends DynamicLoadingSQLParserParameteri
      * @return Test cases from localhost.
      **/
     public Collection<Object[]> getTestParameters(final URI sqlCaseTestURI, final URI sqlCaseResultURI) {
-        Collection<Object[]> result = new LinkedList<>();
-        result.addAll(getSQLCases("localFile", getContent(sqlCaseTestURI), getContent(sqlCaseResultURI)));
+        Collection<Object[]> result = new LinkedList<>(getSQLCases("localFile", getContent(sqlCaseTestURI), getContent(sqlCaseResultURI)));
         if (result.isEmpty()) {
             result.add(new Object[]{"", ""});
         }