You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2022/07/16 03:26:01 UTC

[shardingsphere] branch master updated: Remove unnecessary checkstyle off (#19259)

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 a9a4a8d13ed Remove unnecessary checkstyle off (#19259)
a9a4a8d13ed is described below

commit a9a4a8d13edb8a6bb615582ce887cd6bd4cd1dc5
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sat Jul 16 11:25:56 2022 +0800

    Remove unnecessary checkstyle off (#19259)
---
 .../parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java  | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
index 2449f6dcb9b..c2ea18eb754 100644
--- a/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
+++ b/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/cases/domain/SQLParserTestCases.java
@@ -1600,12 +1600,11 @@ public final class SQLParserTestCases {
      *
      * @return all SQL parser test cases
      */
-    // CHECKSTYLE:OFF
+    @SuppressWarnings("unchecked")
     @SneakyThrows(IllegalAccessException.class)
     public Map<String, SQLParserTestCase> getAllSQLParserTestCases() {
         Map<String, SQLParserTestCase> result = new HashMap<>();
-        Field[] fields = SQLParserTestCases.class.getDeclaredFields();
-        for (Field each : fields) {
+        for (Field each : SQLParserTestCases.class.getDeclaredFields()) {
             if (isSQLParserTestCasesField(each)) {
                 each.setAccessible(true);
                 List<? extends SQLParserTestCase> testCases = (List<? extends SQLParserTestCase>) each.get(this);
@@ -1616,7 +1615,6 @@ public final class SQLParserTestCases {
         }
         return result;
     }
-    // CHECKSTYLE:ON
     
     private boolean isSQLParserTestCasesField(final Field field) {
         if (field.isAnnotationPresent(XmlElement.class) && List.class == field.getType() && field.getGenericType() instanceof ParameterizedType) {