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

mikexue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/eventmesh.git


The following commit(s) were added to refs/heads/master by this push:
     new 19ed469c3 [ISSUE #4146] fix some code to pass checkstyle (#4147)
19ed469c3 is described below

commit 19ed469c366f3a36b63eae0e161b6138d5c8ce4b
Author: TheR1sing3un <[email protected]>
AuthorDate: Sun Jun 25 11:03:04 2023 +0800

    [ISSUE #4146] fix some code to pass checkstyle (#4147)
    
    * style: fix some code to pass checkstyle
    
    1. fix some code to pass checkstyle
    
    Closes https://github.com/apache/eventmesh/issues/4146
    
    * style: add header license
    
    1. add header license
    
    Closes https://github.com/apache/eventmesh/issues/4146
---
 build.gradle                                          |  2 ++
 .../openfunction/client/CallbackServiceGrpc.java      | 19 +++++++++++++++++--
 .../openfunction/client/EventMeshGrpcService.java     | 17 +++++++++++++++++
 .../apache/eventmesh/openconnect/SourceWorker.java    |  2 --
 .../apache/eventmesh/openconnect/util/ConfigUtil.java |  2 +-
 .../storage/kafka/producer/ProducerImpl.java          |  2 --
 6 files changed, 37 insertions(+), 7 deletions(-)

diff --git a/build.gradle b/build.gradle
index 94bd3fa93..87e61fcb6 100644
--- a/build.gradle
+++ b/build.gradle
@@ -88,6 +88,8 @@ allprojects {
 
     checkstyleMain.exclude('**/org/apache/eventmesh/client/grpc/protos**')
                   
.exclude('**/org/apache/eventmesh/common/protocol/grpc/cloudevents**')
+                  
.exclude('**/org/apache/eventmesh/connector/openfunction/client/EventMeshGrpcService**')
+                  
.exclude('**/org/apache/eventmesh/connector/openfunction/client/CallbackServiceGrpc**')
 
     dependencies {
         repositories {
diff --git 
a/eventmesh-connectors/eventmesh-connector-openfunction/src/main/java/org/apache/eventmesh/connector/openfunction/client/CallbackServiceGrpc.java
 
b/eventmesh-connectors/eventmesh-connector-openfunction/src/main/java/org/apache/eventmesh/connector/openfunction/client/CallbackServiceGrpc.java
index 704fba24e..a62dedbca 100644
--- 
a/eventmesh-connectors/eventmesh-connector-openfunction/src/main/java/org/apache/eventmesh/connector/openfunction/client/CallbackServiceGrpc.java
+++ 
b/eventmesh-connectors/eventmesh-connector-openfunction/src/main/java/org/apache/eventmesh/connector/openfunction/client/CallbackServiceGrpc.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.eventmesh.connector.openfunction.client;
 
 import static io.grpc.MethodDescriptor.generateFullMethodName;
@@ -7,8 +24,6 @@ import static io.grpc.stub.ClientCalls.futureUnaryCall;
 import static io.grpc.stub.ServerCalls.asyncUnaryCall;
 import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
 
-import org.apache.eventmesh.connect.openfunction.EventMeshGrpcService;
-
 /**
  *
  */
diff --git 
a/eventmesh-connectors/eventmesh-connector-openfunction/src/main/java/org/apache/eventmesh/connector/openfunction/client/EventMeshGrpcService.java
 
b/eventmesh-connectors/eventmesh-connector-openfunction/src/main/java/org/apache/eventmesh/connector/openfunction/client/EventMeshGrpcService.java
index 79a0da01a..b4c766e05 100644
--- 
a/eventmesh-connectors/eventmesh-connector-openfunction/src/main/java/org/apache/eventmesh/connector/openfunction/client/EventMeshGrpcService.java
+++ 
b/eventmesh-connectors/eventmesh-connector-openfunction/src/main/java/org/apache/eventmesh/connector/openfunction/client/EventMeshGrpcService.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.
+ */
+
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // source: callback-service.proto
 
diff --git 
a/eventmesh-openconnect/eventmesh-openconnect-java/src/main/java/org/apache/eventmesh/openconnect/SourceWorker.java
 
b/eventmesh-openconnect/eventmesh-openconnect-java/src/main/java/org/apache/eventmesh/openconnect/SourceWorker.java
index b64f86e6f..91e494a33 100644
--- 
a/eventmesh-openconnect/eventmesh-openconnect-java/src/main/java/org/apache/eventmesh/openconnect/SourceWorker.java
+++ 
b/eventmesh-openconnect/eventmesh-openconnect-java/src/main/java/org/apache/eventmesh/openconnect/SourceWorker.java
@@ -31,9 +31,7 @@ import org.apache.eventmesh.openconnect.api.source.Source;
 
 import java.net.URI;
 import java.nio.charset.StandardCharsets;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 import java.util.Objects;
 import java.util.UUID;
 import java.util.concurrent.BlockingQueue;
diff --git 
a/eventmesh-openconnect/eventmesh-openconnect-java/src/main/java/org/apache/eventmesh/openconnect/util/ConfigUtil.java
 
b/eventmesh-openconnect/eventmesh-openconnect-java/src/main/java/org/apache/eventmesh/openconnect/util/ConfigUtil.java
index 07d8bb52a..93b2ba958 100644
--- 
a/eventmesh-openconnect/eventmesh-openconnect-java/src/main/java/org/apache/eventmesh/openconnect/util/ConfigUtil.java
+++ 
b/eventmesh-openconnect/eventmesh-openconnect-java/src/main/java/org/apache/eventmesh/openconnect/util/ConfigUtil.java
@@ -39,7 +39,7 @@ public class ConfigUtil {
         if (c == null) {
             return null;
         }
-        if (isSourceConfig(c)){
+        if (isSourceConfig(c)) {
             return parseSourceConfig(c);
         } else if (isSinkConfig(c)) {
             return parseSinkConfig(c);
diff --git 
a/eventmesh-storage-plugin/eventmesh-storage-kafka/src/main/java/org/apache/eventmesh/storage/kafka/producer/ProducerImpl.java
 
b/eventmesh-storage-plugin/eventmesh-storage-kafka/src/main/java/org/apache/eventmesh/storage/kafka/producer/ProducerImpl.java
index 47456a0e3..0a41a42f2 100644
--- 
a/eventmesh-storage-plugin/eventmesh-storage-kafka/src/main/java/org/apache/eventmesh/storage/kafka/producer/ProducerImpl.java
+++ 
b/eventmesh-storage-plugin/eventmesh-storage-kafka/src/main/java/org/apache/eventmesh/storage/kafka/producer/ProducerImpl.java
@@ -24,11 +24,9 @@ import org.apache.eventmesh.api.exception.OnExceptionContext;
 import org.apache.eventmesh.api.exception.StorageRuntimeException;
 
 import org.apache.kafka.clients.admin.Admin;
-import org.apache.kafka.clients.producer.Callback;
 import org.apache.kafka.clients.producer.KafkaProducer;
 import org.apache.kafka.clients.producer.ProducerConfig;
 import org.apache.kafka.clients.producer.ProducerRecord;
-import org.apache.kafka.clients.producer.RecordMetadata;
 import org.apache.kafka.common.serialization.StringSerializer;
 
 import java.util.Objects;


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

Reply via email to