You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2023/05/18 11:38:00 UTC

[shardingsphere] branch master updated: Fix sonar issue of SQLServerRevokeStatementAssert (#25762)

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

zhonghongsheng 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 53fb6d5bc43 Fix sonar issue of SQLServerRevokeStatementAssert (#25762)
53fb6d5bc43 is described below

commit 53fb6d5bc4310dcd68f9319457238ca7938852d7
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Thu May 18 19:37:53 2023 +0800

    Fix sonar issue of SQLServerRevokeStatementAssert (#25762)
---
 .../statement/dcl/impl/sqlserver/SQLServerRevokeStatementAssert.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dcl/impl/sqlserver/SQLServerRevokeStatementAssert.java b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dcl/impl/sqlserver/SQLServerRevokeStatementAssert.java
index 41f472f455f..de01e65646d 100644
--- a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dcl/impl/sqlserver/SQLServerRevokeStatementAssert.java
+++ b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dcl/impl/sqlserver/SQLServerRevokeStatementAssert.java
@@ -39,10 +39,10 @@ public final class SQLServerRevokeStatementAssert {
      * @param expected expected revoke statement test case
      */
     public static void assertIs(final SQLCaseAssertContext assertContext, final SQLServerRevokeStatement actual, final RevokeStatementTestCase expected) {
-        if (0 != expected.getTables().size()) {
+        if (!expected.getTables().isEmpty()) {
             TableAssert.assertIs(assertContext, actual.getTables(), expected.getTables());
         }
-        if (0 != expected.getColumns().size()) {
+        if (!expected.getColumns().isEmpty()) {
             ColumnAssert.assertIs(assertContext, actual.getColumns(), expected.getColumns());
         }
     }