xuxiaowei-com-cn commented on code in PR #8057:
URL: https://github.com/apache/incubator-seata/pull/8057#discussion_r3144801239


##########
saga/seata-saga-engine/src/main/java/org/apache/seata/saga/engine/strategy/impl/DefaultStatusDecisionStrategy.java:
##########
@@ -117,8 +117,6 @@ public static void 
setMachineStatusBasedOnStateListAndException(
                             hasSuccessUpdateService = true;
                         }
                     }
-                } else if 
(ExecutionStatus.SK.equals(stateInstance.getStatus())) {

Review Comment:
   # English
   
   1. This is because the `<module name="EmptyBlock"/>` is enabled in 
`style/checkstyle.xml`.  
   2. I think it would be unreasonable to simply remove the `<module 
name="EmptyBlock"/>` rule.  
   3. If you need to keep that empty line of code, you can enable `<module 
name="SuppressWarningsHolder"/>` and use 
`@SuppressWarnings("checkstyle:EmptyBlock")` to suppress that specific check.  
   4. Note: Using `@SuppressWarnings("checkstyle:...")` may lead to abuse.
   
   # 中文
   
   1. 这个原因是因为在 `style/checkstyle.xml` 启用了 `<module name="EmptyBlock"/>`
   2. 我觉得如果要删除 `<module name="EmptyBlock"/>` 规则是不合理的
   3. 如果需要保留这行空代码,可以启用 `<module name="SuppressWarningsHolder"/>`,并使用 
`@SuppressWarnings("checkstyle:EmptyBlock")` 忽略某个检查。
   4. 注意:使用 `@SuppressWarnings("checkstyle:...")` 可能会出现滥用的情况。
   



##########
server/src/main/java/org/apache/seata/server/storage/file/lock/FileLocker.java:
##########
@@ -95,8 +95,6 @@ public boolean acquireLock(List<RowLock> rowLocks, boolean 
autoCommit, boolean s
                 Set<String> keysInHolder = CollectionUtils.computeIfAbsent(
                         bucketHolder, bucketLockMap, key -> 
ConcurrentHashMap.newKeySet());
                 keysInHolder.add(pk);
-            } else if (previousLockBranchSession.getTransactionId() == 
transactionId) {

Review Comment:
   # English
   
   1. This is because the `<module name="EmptyBlock"/>` is enabled in 
`style/checkstyle.xml`.  
   2. I think it would be unreasonable to simply remove the `<module 
name="EmptyBlock"/>` rule.  
   3. If you need to keep that empty line of code, you can enable `<module 
name="SuppressWarningsHolder"/>` and use 
`@SuppressWarnings("checkstyle:EmptyBlock")` to suppress that specific check.  
   4. Note: Using `@SuppressWarnings("checkstyle:...")` may lead to abuse.
   
   # 中文
   
   1. 这个原因是因为在 `style/checkstyle.xml` 启用了 `<module name="EmptyBlock"/>`
   2. 我觉得如果要删除 `<module name="EmptyBlock"/>` 规则是不合理的
   3. 如果需要保留这行空代码,可以启用 `<module name="SuppressWarningsHolder"/>`,并使用 
`@SuppressWarnings("checkstyle:EmptyBlock")` 忽略某个检查。
   4. 注意:使用 `@SuppressWarnings("checkstyle:...")` 可能会出现滥用的情况。
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to