You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ch...@apache.org on 2024/04/15 01:56:22 UTC

(shardingsphere) branch master updated: Fix sonar issue caused by collection change and public modifier (#30886)

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

chengzhang 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 ea52e8d754e Fix sonar issue caused by collection change and public modifier (#30886)
ea52e8d754e is described below

commit ea52e8d754e8971411c0d98c398b532975025e54
Author: Zhengqiang Duan <du...@apache.org>
AuthorDate: Mon Apr 15 09:56:15 2024 +0800

    Fix sonar issue caused by collection change and public modifier (#30886)
---
 .../sqlfederation/executor/constant/EnumerableConstants.java     | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/constant/EnumerableConstants.java b/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/constant/EnumerableConstants.java
index fec78da59fd..9da972e8354 100644
--- a/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/constant/EnumerableConstants.java
+++ b/kernel/sql-federation/executor/src/main/java/org/apache/shardingsphere/sqlfederation/executor/constant/EnumerableConstants.java
@@ -21,6 +21,7 @@ import com.cedarsoftware.util.CaseInsensitiveSet;
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 
+import java.util.Arrays;
 import java.util.Collection;
 
 /**
@@ -29,8 +30,6 @@ import java.util.Collection;
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
 public final class EnumerableConstants {
     
-    public static final Collection<String> SYSTEM_CATALOG_TABLES = new CaseInsensitiveSet<>(3, 1F);
-    
     public static final String DAT_COMPATIBILITY = "PG";
     
     public static final String PG_DATABASE = "pg_database";
@@ -39,9 +38,5 @@ public final class EnumerableConstants {
     
     public static final String PG_ROLES = "pg_roles";
     
-    static {
-        SYSTEM_CATALOG_TABLES.add(PG_DATABASE);
-        SYSTEM_CATALOG_TABLES.add(PG_TABLES);
-        SYSTEM_CATALOG_TABLES.add(PG_ROLES);
-    }
+    public static final Collection<String> SYSTEM_CATALOG_TABLES = new CaseInsensitiveSet<>(Arrays.asList(PG_DATABASE, PG_TABLES, PG_ROLES));
 }