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

duanzhengqiang 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 b55b6a757d0 Fix sonar issue of SQLServerGrantStatementAssert (#25761)
b55b6a757d0 is described below

commit b55b6a757d078979b7e5c82ea9b42690a6a0ab45
Author: Liang Zhang <[email protected]>
AuthorDate: Thu May 18 15:33:41 2023 +0800

    Fix sonar issue of SQLServerGrantStatementAssert (#25761)
    
    * Fix sonar issue of ShowVersionExecutor
    
    * Fix sonar issue of SQLServerGrantStatementAssert
---
 .../statement/dcl/impl/sqlserver/SQLServerGrantStatementAssert.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/SQLServerGrantStatementAssert.java
 
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dcl/impl/sqlserver/SQLServerGrantStatementAssert.java
index bc07ddeb1fa..7abc047e2da 100644
--- 
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dcl/impl/sqlserver/SQLServerGrantStatementAssert.java
+++ 
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dcl/impl/sqlserver/SQLServerGrantStatementAssert.java
@@ -39,10 +39,10 @@ public final class SQLServerGrantStatementAssert {
      * @param expected expected grant statement test case
      */
     public static void assertIs(final SQLCaseAssertContext assertContext, 
final SQLServerGrantStatement actual, final GrantStatementTestCase 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());
         }
     }

Reply via email to