Pil0tXia commented on code in PR #4447:
URL: https://github.com/apache/eventmesh/pull/4447#discussion_r1328364630


##########
style/format/license-header:
##########


Review Comment:
   This file is duplicate with `style/checkstyle-header1.txt`.



##########
eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/catalog/protos/QueryOperationsRequestOrBuilder.java:
##########
@@ -15,15 +15,13 @@
  * limitations under the License.
  */
 
-// Generated by the protocol buffer compiler.  DO NOT EDIT!
-// source: catalog.proto
-
 package org.apache.eventmesh.common.protocol.catalog.protos;
 
 @SuppressWarnings({"all"})
-public interface QueryOperationsRequestOrBuilder extends
-    // 
@@protoc_insertion_point(interface_extends:eventmesh.catalog.api.protocol.QueryOperationsRequest)
-    com.google.protobuf.MessageOrBuilder {
+public interface QueryOperationsRequestOrBuilder
+        extends
+            // 
@@protoc_insertion_point(interface_extends:eventmesh.catalog.api.protocol.QueryOperationsRequest)
+            com.google.protobuf.MessageOrBuilder {
 

Review Comment:
   May you please tell me why the extends keyword needs to be line-breaking? 
And why the comment is removed?



##########
eventmesh-webhook/eventmesh-webhook-admin/src/main/java/org/apache/eventmesh/webhook/admin/FileWebHookConfigOperation.java:
##########
@@ -159,8 +159,9 @@ public List<WebHookConfig> 
queryWebHookConfigByManufacturer(final WebHookConfig
     private WebHookConfig getWebHookConfigFromFile(final File 
webhookConfigFile) {
         final StringBuilder fileContent = new StringBuilder();
 
-        try (BufferedReader br = 
Files.newBufferedReader(Paths.get(webhookConfigFile.getAbsolutePath()),
-            StandardCharsets.UTF_8)) {
+        try (
+                BufferedReader br = 
Files.newBufferedReader(Paths.get(webhookConfigFile.getAbsolutePath()),
+                        StandardCharsets.UTF_8)) {
             String line;

Review Comment:
   I don't think formating like this is beautiful:
   
   
![image](https://github.com/apache/eventmesh/assets/41445332/01ff3fdc-a119-4f4a-bc74-b8be7010819f)
   



##########
eventmesh-webhook/eventmesh-webhook-receive/src/main/java/org/apache/eventmesh/webhook/receive/WebHookController.java:
##########
@@ -93,7 +93,7 @@ public void execute(String path, Map<String, String> header, 
byte[] body) throws
 
         if (!Objects.equals(webHookConfig.getContentType(), 
header.get(CONTENT_TYPE))) {
             throw new Exception(
-                "http request header content-type value is mismatch. current 
value " + header.get(CONTENT_TYPE));
+                    "http request header content-type value is mismatch. 
current value " + header.get(CONTENT_TYPE));
         }

Review Comment:
   I wonder why this place needs one more TAB? It seems the original version 
already has one. 
   
   Also, the spotless format rule **conflicts with** IDEA's. IDEA will 
re-format the spotless formated code to the original version:
   
   
![image](https://github.com/apache/eventmesh/assets/41445332/2aab570f-f979-4c1c-928c-51e0999e05eb)
   
   Many similar changes are made like this.



##########
eventmesh-webhook/eventmesh-webhook-admin/src/main/java/org/apache/eventmesh/webhook/admin/FileWebHookConfigOperation.java:
##########
@@ -64,7 +64,7 @@ public Integer insertWebHookConfig(final WebHookConfig 
webHookConfig) {
         if 
(!webHookConfig.getCallbackPath().startsWith(WebHookOperationConstant.CALLBACK_PATH_PREFIX))
 {
             if (log.isErrorEnabled()) {
                 log.error("webhookConfig callback path must start with {}",
-                    WebHookOperationConstant.CALLBACK_PATH_PREFIX);
+                        WebHookOperationConstant.CALLBACK_PATH_PREFIX);
             }

Review Comment:
   L66 and L67 should be merged into one line. I think the spotless plugin does 
not suppurt this feature.



-- 
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