You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by du...@apache.org on 2022/07/31 08:39:31 UTC

[rocketmq-schema-registry] 31/37: update checkstyle

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

duhengforever pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/rocketmq-schema-registry.git

commit 83d34082be61962bdd00fd4517fd8d0737590ea4
Author: fan <wa...@xiaomi.com>
AuthorDate: Sun Jul 31 13:05:17 2022 +0800

    update checkstyle
---
 .asf.yaml                                            | 17 ++++++++++++++++-
 bump-version.sh                                      | 15 +++++++++++++++
 client/pom.xml                                       | 20 ++++++++++++++++++--
 .../registry/common/dto/UpdateSchemaRequest.java     |  2 --
 .../registry/common/json/JsonConverterImpl.java      |  1 -
 core/pom.xml                                         | 19 ++++++++++++++++++-
 .../registry/core/api/v1/SchemaController.java       | 11 ++++++-----
 .../registry/core/service/SchemaServiceImpl.java     |  1 -
 core/src/main/resources/template.pom                 | 16 ++++++++++++++++
 .../schema/registry/core/CoreApplicationTests.java   | 17 +++++++++++++++++
 .../core/controller/HelloControllerTest.java         | 17 +++++++++++++++--
 pom.xml                                              | 16 ++++++++++++++++
 12 files changed, 137 insertions(+), 15 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
index 83d040d..b157d82 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -1,4 +1,19 @@
-github:
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+  github:
   features:
     # Enable issue management
     issues: true
diff --git a/bump-version.sh b/bump-version.sh
index aeea11f..7549fb4 100644
--- a/bump-version.sh
+++ b/bump-version.sh
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 #!/usr/bin/env bash
 if [[ $1 == "" ]]; then
   echo "Usage: bump-version.sh version"
diff --git a/client/pom.xml b/client/pom.xml
index 3eb70b8..c9b2f27 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -1,11 +1,27 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <artifactId>rocketmq-schema-registry-all</artifactId>
         <groupId>org.apache.rocketmq</groupId>
-        <version>0.0.2-SNAPSHOT</version>
+        <version>0.0.3-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -14,7 +30,7 @@
         <dependency>
             <groupId>org.apache.rocketmq</groupId>
             <artifactId>schema-registry-common</artifactId>
-            <version>0.0.2-SNAPSHOT</version>
+            <version>0.0.3-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
     </dependencies>
diff --git a/common/src/main/java/org/apache/rocketmq/schema/registry/common/dto/UpdateSchemaRequest.java b/common/src/main/java/org/apache/rocketmq/schema/registry/common/dto/UpdateSchemaRequest.java
index 7d22f19..3eeb64a 100644
--- a/common/src/main/java/org/apache/rocketmq/schema/registry/common/dto/UpdateSchemaRequest.java
+++ b/common/src/main/java/org/apache/rocketmq/schema/registry/common/dto/UpdateSchemaRequest.java
@@ -23,8 +23,6 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
-import org.apache.rocketmq.schema.registry.common.model.Compatibility;
-import org.apache.rocketmq.schema.registry.common.model.SchemaType;
 
 @Data
 @EqualsAndHashCode(callSuper = false)
diff --git a/common/src/main/java/org/apache/rocketmq/schema/registry/common/json/JsonConverterImpl.java b/common/src/main/java/org/apache/rocketmq/schema/registry/common/json/JsonConverterImpl.java
index ae0bac4..5449183 100644
--- a/common/src/main/java/org/apache/rocketmq/schema/registry/common/json/JsonConverterImpl.java
+++ b/common/src/main/java/org/apache/rocketmq/schema/registry/common/json/JsonConverterImpl.java
@@ -20,7 +20,6 @@ package org.apache.rocketmq.schema.registry.common.json;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.google.gson.Gson;
-import com.google.gson.JsonObject;
 import java.nio.charset.StandardCharsets;
 import lombok.Getter;
 import lombok.NoArgsConstructor;
diff --git a/core/pom.xml b/core/pom.xml
index 2b4d822..04baa7c 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -1,4 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
@@ -21,7 +38,7 @@
 
         <dependency>
             <groupId>org.apache.rocketmq</groupId>
-            <artifactId>storage-rocketmq</artifactId>
+            <artifactId>schema-registry-storage-rocketmq</artifactId>
             <version>${project.version}</version>
         </dependency>
     </dependencies>
diff --git a/core/src/main/java/org/apache/rocketmq/schema/registry/core/api/v1/SchemaController.java b/core/src/main/java/org/apache/rocketmq/schema/registry/core/api/v1/SchemaController.java
index 79dbe4e..40749dc 100644
--- a/core/src/main/java/org/apache/rocketmq/schema/registry/core/api/v1/SchemaController.java
+++ b/core/src/main/java/org/apache/rocketmq/schema/registry/core/api/v1/SchemaController.java
@@ -103,7 +103,7 @@ public class SchemaController {
                 message = "The requested schema cannot be registered"
             )
         }
-    )
+        )
     public RegisterSchemaResponse registerSchema(
         @ApiParam(value = "The subject of the schema", required = true)
         @PathVariable(value = "subject-name") final String subject,
@@ -136,7 +136,7 @@ public class SchemaController {
                 message = "The requested schema cannot be registered"
             )
         }
-    )
+        )
     public RegisterSchemaResponse registerSchema(
         @ApiParam(value = "The cluster of the subject", required = true)
         @PathVariable(value = "cluster-name") final String cluster,
@@ -180,7 +180,8 @@ public class SchemaController {
                 code = HttpURLConnection.HTTP_NOT_FOUND,
                 message = "The requested schema cannot be found or it's still been used"
             )
-        })
+        }
+        )
     public SchemaDto deleteSchema(
         @ApiParam(value = "The cluster of the subject", required = true)
         @PathVariable(value = "cluster-name") final String cluster,
@@ -256,7 +257,7 @@ public class SchemaController {
                 message = "The requested schema cannot be found"
             )
         }
-    )
+        )
     public UpdateSchemaResponse updateSchema(
         @ApiParam(value = "The subject of the schema", required = true)
         @PathVariable(value = "subject-name") final String subject,
@@ -288,7 +289,7 @@ public class SchemaController {
                 message = "The requested schema cannot be found"
             )
         }
-    )
+        )
     public UpdateSchemaResponse updateSchema(
         @ApiParam(value = "The cluster of the subject", required = true)
         @PathVariable(value = "cluster-name") final String cluster,
diff --git a/core/src/main/java/org/apache/rocketmq/schema/registry/core/service/SchemaServiceImpl.java b/core/src/main/java/org/apache/rocketmq/schema/registry/core/service/SchemaServiceImpl.java
index badfbbe..c883ac9 100644
--- a/core/src/main/java/org/apache/rocketmq/schema/registry/core/service/SchemaServiceImpl.java
+++ b/core/src/main/java/org/apache/rocketmq/schema/registry/core/service/SchemaServiceImpl.java
@@ -43,7 +43,6 @@ import org.apache.rocketmq.schema.registry.common.model.SchemaInfo;
 import org.apache.rocketmq.schema.registry.common.model.SchemaMetaInfo;
 import org.apache.rocketmq.schema.registry.common.model.SchemaOperation;
 import org.apache.rocketmq.schema.registry.common.model.SchemaRecordInfo;
-import org.apache.rocketmq.schema.registry.common.model.SubjectInfo;
 import org.apache.rocketmq.schema.registry.common.properties.GlobalConfig;
 import org.apache.rocketmq.schema.registry.common.storage.StorageServiceProxy;
 import org.apache.rocketmq.schema.registry.common.utils.CommonUtil;
diff --git a/core/src/main/resources/template.pom b/core/src/main/resources/template.pom
index 1216cfc..76338d2 100644
--- a/core/src/main/resources/template.pom
+++ b/core/src/main/resources/template.pom
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/core/src/test/java/org/apache/rocketmq/schema/registry/core/CoreApplicationTests.java b/core/src/test/java/org/apache/rocketmq/schema/registry/core/CoreApplicationTests.java
index cb2017f..4309c0b 100644
--- a/core/src/test/java/org/apache/rocketmq/schema/registry/core/CoreApplicationTests.java
+++ b/core/src/test/java/org/apache/rocketmq/schema/registry/core/CoreApplicationTests.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.rocketmq.schema.registry.core;
 
 import org.junit.jupiter.api.Test;
diff --git a/core/src/test/java/org/apache/rocketmq/schema/registry/core/controller/HelloControllerTest.java b/core/src/test/java/org/apache/rocketmq/schema/registry/core/controller/HelloControllerTest.java
index 9f4dea5..4162694 100644
--- a/core/src/test/java/org/apache/rocketmq/schema/registry/core/controller/HelloControllerTest.java
+++ b/core/src/test/java/org/apache/rocketmq/schema/registry/core/controller/HelloControllerTest.java
@@ -1,5 +1,18 @@
-/**
- * Copyright 2022, Xiaomi. All rights reserved. Author: wangfan8@xiaomi.com
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 package org.apache.rocketmq.schema.registry.core.controller;
diff --git a/pom.xml b/pom.xml
index f9c389d..d25e827 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>