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

terrymanu 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 d34b6f50b44 Enforce Checkstyle annotation order and warning reporting 
(#39789)
d34b6f50b44 is described below

commit d34b6f50b449a232d69dd0c8d5e432228932cac4
Author: Liang Zhang <[email protected]>
AuthorDate: Thu Sep 10 15:33:05 2026 +0800

    Enforce Checkstyle annotation order and warning reporting (#39789)
---
 .../connector/h2/metadata/data/loader/H2MetaDataLoader.java         | 3 ++-
 .../pipeline/core/consistencycheck/DataConsistencyCheckUtils.java   | 4 ++--
 .../data/pipeline/core/metadata/model/PipelineTableMetaData.java    | 2 +-
 src/resources/checkstyle.xml                                        | 6 ++++--
 4 files changed, 9 insertions(+), 6 deletions(-)

diff --git 
a/database/connector/dialect/h2/src/main/java/org/apache/shardingsphere/database/connector/h2/metadata/data/loader/H2MetaDataLoader.java
 
b/database/connector/dialect/h2/src/main/java/org/apache/shardingsphere/database/connector/h2/metadata/data/loader/H2MetaDataLoader.java
index 61ea93b436d..ff04cd11c33 100644
--- 
a/database/connector/dialect/h2/src/main/java/org/apache/shardingsphere/database/connector/h2/metadata/data/loader/H2MetaDataLoader.java
+++ 
b/database/connector/dialect/h2/src/main/java/org/apache/shardingsphere/database/connector/h2/metadata/data/loader/H2MetaDataLoader.java
@@ -72,7 +72,8 @@ public final class H2MetaDataLoader implements 
DialectMetaDataLoader {
         Collection<TableMetaData> tableMetaDataList = new LinkedList<>();
         try (Connection connection = material.getDataSource().getConnection()) 
{
             Collection<String> tables = material.getActualTableNames();
-            Map<String, Collection<ColumnMetaData>> columnMetaDataMap = 
loadColumnMetaDataMap(connection, tables, 
loadTablePrimaryKeyColumns(connection, tables), loadTableGenerated(connection, 
tables));
+            Map<String, Collection<ColumnMetaData>> columnMetaDataMap = 
loadColumnMetaDataMap(
+                    connection, tables, loadTablePrimaryKeyColumns(connection, 
tables), loadTableGenerated(connection, tables));
             Collection<String> viewNames = columnMetaDataMap.isEmpty() ? 
Collections.emptySet() : loadViewNames(connection, columnMetaDataMap.keySet());
             Map<String, Collection<IndexMetaData>> indexMetaDataMap = 
columnMetaDataMap.isEmpty() ? Collections.emptyMap() : 
loadIndexMetaData(connection, columnMetaDataMap.keySet());
             for (Entry<String, Collection<ColumnMetaData>> entry : 
columnMetaDataMap.entrySet()) {
diff --git 
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/DataConsistencyCheckUtils.java
 
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/DataConsistencyCheckUtils.java
index e993a47b846..c4d85a5ea4f 100644
--- 
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/DataConsistencyCheckUtils.java
+++ 
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/consistencycheck/DataConsistencyCheckUtils.java
@@ -186,7 +186,7 @@ public final class DataConsistencyCheckUtils {
      * @param thatList that list
      * @return true if lists equals, otherwise false
      */
-    public static boolean compareLists(final @Nullable Collection<?> thisList, 
final @Nullable Collection<?> thatList) {
+    public static boolean compareLists(@Nullable final Collection<?> thisList, 
@Nullable final Collection<?> thatList) {
         if (null == thisList && null == thatList) {
             return true;
         }
@@ -213,7 +213,7 @@ public final class DataConsistencyCheckUtils {
      * @param uniqueKey unique key
      * @return first unique key value
      */
-    public static Object getFirstUniqueKeyValue(final Map<String, Object> 
record, final @Nullable String uniqueKey) {
+    public static Object getFirstUniqueKeyValue(final Map<String, Object> 
record, @Nullable final String uniqueKey) {
         return record.isEmpty() || null == uniqueKey ? null : 
record.get(uniqueKey);
     }
 }
diff --git 
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/metadata/model/PipelineTableMetaData.java
 
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/metadata/model/PipelineTableMetaData.java
index 2e930186435..677139f7336 100644
--- 
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/metadata/model/PipelineTableMetaData.java
+++ 
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/metadata/model/PipelineTableMetaData.java
@@ -54,7 +54,7 @@ public final class PipelineTableMetaData {
     @Getter
     private final Collection<PipelineIndexMetaData> uniqueIndexes;
     
-    public PipelineTableMetaData(final @NonNull String name, final 
Map<ShardingSphereIdentifier, PipelineColumnMetaData> columnMetaDataMap, final 
Collection<PipelineIndexMetaData> uniqueIndexes) {
+    public PipelineTableMetaData(@NonNull final String name, final 
Map<ShardingSphereIdentifier, PipelineColumnMetaData> columnMetaDataMap, final 
Collection<PipelineIndexMetaData> uniqueIndexes) {
         this.name = name;
         this.columnMetaDataMap = columnMetaDataMap;
         List<PipelineColumnMetaData> columnMetaDataList = new 
ArrayList<>(columnMetaDataMap.values());
diff --git a/src/resources/checkstyle.xml b/src/resources/checkstyle.xml
index 804fa24d35e..5a5ead064df 100644
--- a/src/resources/checkstyle.xml
+++ b/src/resources/checkstyle.xml
@@ -21,8 +21,6 @@
     <property name="severity" value="error" />
     <property name="fileExtensions" value="java, xml, properties" />
     
-    <module name="SeverityMatchFilter" />
-    
     <module name="Header">
         <property name="fileExtensions" value="java" />
     </module>
@@ -62,6 +60,10 @@
             <property name="allowSamelineMultipleAnnotations" value="true" />
         </module>
         <module name="AnnotationUseStyle" />
+        <module name="MatchXpath">
+            <property name="query" 
value="//MODIFIERS[FINAL/following-sibling::ANNOTATION]" />
+            <message key="matchxpath.match" value="Place annotations before 
the final modifier." />
+        </module>
         <module name="MissingDeprecated" />
         <module name="MissingOverride" />
         <module name="MissingOverrideOnRecordAccessor" />

Reply via email to