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

panjuan 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 eb48c462438 Fix sonar issues (#29456)
eb48c462438 is described below

commit eb48c462438c6741e122eb37383711e4f9129d86
Author: Liang Zhang <[email protected]>
AuthorDate: Tue Dec 19 22:07:01 2023 +0800

    Fix sonar issues (#29456)
---
 .../metadata/reviser/column/EncryptColumnExistedReviserTest.java  | 8 ++++----
 .../handler/query/ShowMaskAlgorithmImplementationsExecutor.java   | 1 +
 .../org/apache/shardingsphere/infra/util/groovy/GroovyUtils.java  | 6 +++++-
 .../status/cluster/subscriber/ClusterStatusSubscriberTest.java    | 2 +-
 4 files changed, 11 insertions(+), 6 deletions(-)

diff --git 
a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/metadata/reviser/column/EncryptColumnExistedReviserTest.java
 
b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/metadata/reviser/column/EncryptColumnExistedReviserTest.java
index 0aa7bbfb8c4..56c774b5cef 100644
--- 
a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/metadata/reviser/column/EncryptColumnExistedReviserTest.java
+++ 
b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/metadata/reviser/column/EncryptColumnExistedReviserTest.java
@@ -28,7 +28,7 @@ import static org.mockito.Mockito.when;
 class EncryptColumnExistedReviserTest {
     
     @Test
-    public void assertIsExistedWithCipherColumn() {
+    void assertIsExistedWithCipherColumn() {
         EncryptTable encryptTable = mock(EncryptTable.class);
         when(encryptTable.isCipherColumn("cipher_column")).thenReturn(true);
         EncryptColumnExistedReviser reviser = new 
EncryptColumnExistedReviser(encryptTable);
@@ -36,7 +36,7 @@ class EncryptColumnExistedReviserTest {
     }
     
     @Test
-    public void assertIsExistedWithAssistedQueryColumn() {
+    void assertIsExistedWithAssistedQueryColumn() {
         EncryptTable encryptTable = mock(EncryptTable.class);
         
when(encryptTable.isAssistedQueryColumn("assisted_query_column")).thenReturn(true);
         EncryptColumnExistedReviser reviser = new 
EncryptColumnExistedReviser(encryptTable);
@@ -44,7 +44,7 @@ class EncryptColumnExistedReviserTest {
     }
     
     @Test
-    public void assertIsExistedWithLikeQueryColumn() {
+    void assertIsExistedWithLikeQueryColumn() {
         EncryptTable encryptTable = mock(EncryptTable.class);
         
when(encryptTable.isLikeQueryColumn("like_query_column")).thenReturn(true);
         EncryptColumnExistedReviser reviser = new 
EncryptColumnExistedReviser(encryptTable);
@@ -52,7 +52,7 @@ class EncryptColumnExistedReviserTest {
     }
     
     @Test
-    public void assertIsExistedWithNormalColumn() {
+    void assertIsExistedWithNormalColumn() {
         EncryptTable encryptTable = mock(EncryptTable.class);
         EncryptColumnExistedReviser reviser = new 
EncryptColumnExistedReviser(encryptTable);
         assertTrue(reviser.isExisted("normal_column"));
diff --git 
a/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/query/ShowMaskAlgorithmImplementationsExecutor.java
 
b/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/query/ShowMaskAlgorithmImplementationsExecutor.java
index 4c6f806de69..3ee2924516f 100644
--- 
a/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/query/ShowMaskAlgorithmImplementationsExecutor.java
+++ 
b/features/mask/distsql/handler/src/main/java/org/apache/shardingsphere/mask/distsql/handler/query/ShowMaskAlgorithmImplementationsExecutor.java
@@ -37,6 +37,7 @@ public final class ShowMaskAlgorithmImplementationsExecutor 
implements Queryable
         return Arrays.asList("name", "type", "class_path");
     }
     
+    @SuppressWarnings("rawtypes")
     @Override
     public Collection<LocalDataQueryResultRow> getRows(final 
ShowMaskAlgorithmImplementationsStatement sqlStatement) {
         Collection<LocalDataQueryResultRow> result = new LinkedList<>();
diff --git 
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/groovy/GroovyUtils.java
 
b/infra/util/src/main/java/org/apache/shardingsphere/infra/util/groovy/GroovyUtils.java
index 6bc8424a50c..1e88b65f3f0 100644
--- 
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/groovy/GroovyUtils.java
+++ 
b/infra/util/src/main/java/org/apache/shardingsphere/infra/util/groovy/GroovyUtils.java
@@ -17,6 +17,9 @@
 
 package org.apache.shardingsphere.infra.util.groovy;
 
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+
 import java.util.ArrayList;
 import java.util.List;
 
@@ -25,7 +28,8 @@ import java.util.List;
  * - 
`org.apache.shardingsphere.infra.expr.espresso.EspressoInlineExpressionParser`
  * - `org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser`
  */
-public class GroovyUtils {
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class GroovyUtils {
     
     /**
      * Split GroovyShell expression to a ArrayList.
diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/cluster/subscriber/ClusterStatusSubscriberTest.java
 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/cluster/subscriber/ClusterStatusSubscriberTest.java
index b4bfe6428c7..0657f71377c 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/cluster/subscriber/ClusterStatusSubscriberTest.java
+++ 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/cluster/subscriber/ClusterStatusSubscriberTest.java
@@ -36,7 +36,7 @@ class ClusterStatusSubscriberTest {
     private ClusterPersistRepository repository;
     
     @Test
-    void updateTest() {
+    void assertUpdate() {
         ClusterStatusSubscriber clusterStatusSubscriber = new 
ClusterStatusSubscriber(repository, new EventBusContext());
         ClusterStatusChangedEvent event = new 
ClusterStatusChangedEvent(ClusterState.OK);
         clusterStatusSubscriber.update(event);

Reply via email to