Skip to content

Commit

Permalink
[ISSUE apache#2002] Solve the project compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
githublaohu committed Oct 28, 2022
1 parent e12b8d8 commit 6f65d1a
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,10 @@ dependencies {
// test dependencies
testImplementation 'ai.grakn:redis-mock:0.1.6'
testImplementation "org.mockito:mockito-core"

compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'

testCompileOnly 'org.projectlombok:lombok:1.18.22'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
}
Original file line number Diff line number Diff line change
@@ -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.selector;

import org.apache.eventmesh.client.selector.Selector;
Expand Down
16 changes: 0 additions & 16 deletions eventmesh-filter-plugin/build.gradle

This file was deleted.

23 changes: 0 additions & 23 deletions eventmesh-filter-plugin/eventmesh-filter-api/build.gradle

This file was deleted.

16 changes: 0 additions & 16 deletions eventmesh-filter-plugin/eventmesh-filter-api/gradle.properties

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import java.lang.ref.WeakReference;
import java.net.InetSocketAddress;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.locks.ReentrantLock;

import org.slf4j.Logger;
Expand Down Expand Up @@ -212,17 +213,17 @@ public void write2Client(final Package pkg) {
return;
}
context.writeAndFlush(pkg).addListener(
new ChannelFutureListener() {
@Override
public void operationComplete(ChannelFuture future) throws Exception {
if (!future.isSuccess()) {
messageLogger.error("write2Client fail, pkg[{}] session[{}]", pkg, this);
} else {
clientGroupWrapper.get().getEventMeshTcpMonitor().getTcpSummaryMetrics().getEventMesh2clientMsgNum()
.incrementAndGet();
}
new ChannelFutureListener() {
@Override
public void operationComplete(ChannelFuture future) throws Exception {
if (!future.isSuccess()) {
messageLogger.error("write2Client fail, pkg[{}] session[{}]", pkg, this);
} else {
clientGroupWrapper.get().getEventMeshTcpMonitor().getTcpSummaryMetrics().getEventMesh2clientMsgNum()
.incrementAndGet();
}
}
}
);
} catch (Exception e) {
logger.error("exception while write2Client", e);
Expand All @@ -232,24 +233,24 @@ public void operationComplete(ChannelFuture future) throws Exception {
@Override
public String toString() {
return "Session{"
+
"sysId=" + clientGroupWrapper.get().getSysId()
+
",remoteAddr=" + RemotingHelper.parseSocketAddressAddr(remoteAddress)
+
",client=" + client
+
",sessionState=" + sessionState
+
",sessionContext=" + sessionContext
+
",pusher=" + pusher
+
",sender=" + sender
+
",createTime=" + DateFormatUtils.format(createTime, EventMeshConstants.DATE_FORMAT)
+
",lastHeartbeatTime=" + DateFormatUtils.format(lastHeartbeatTime, EventMeshConstants.DATE_FORMAT) + '}';
+
"sysId=" + clientGroupWrapper.get().getSysId()
+
",remoteAddr=" + RemotingHelper.parseSocketAddressAddr(remoteAddress)
+
",client=" + client
+
",sessionState=" + sessionState
+
",sessionContext=" + sessionContext
+
",pusher=" + pusher
+
",sender=" + sender
+
",createTime=" + DateFormatUtils.format(createTime, EventMeshConstants.DATE_FORMAT)
+
",lastHeartbeatTime=" + DateFormatUtils.format(lastHeartbeatTime, EventMeshConstants.DATE_FORMAT) + '}';
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class GithubProtocol implements ManufacturerProtocol {

private static final String H_MAC_SHA = "HmacSHA256";

private static final Char ZERO_CHAR = '0';
private static final char ZERO_CHAR = '0';

public Logger logger = LoggerFactory.getLogger(this.getClass());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileSystems;
import java.nio.file.Paths;
import java.nio.file.WatchEvent;
Expand Down Expand Up @@ -100,7 +101,7 @@ public void readFiles(File file) {
*/
public void cacheInit(File webhookConfigFile) {
StringBuilder fileContent = new StringBuilder();
try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(webhookConfigFile), StandardCharsets.UFT_8))) {
try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(webhookConfigFile), StandardCharsets.UTF_8))) {
String line = null;
while ((line = br.readLine()) != null) {
fileContent.append(line);
Expand Down
5 changes: 1 addition & 4 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,4 @@ include 'eventmesh-trace-plugin:eventmesh-trace-pinpoint'
include 'eventmesh-webhook'
include 'eventmesh-webhook:eventmesh-webhook-api'
include 'eventmesh-webhook:eventmesh-webhook-admin'
include 'eventmesh-webhook:eventmesh-webhook-receive'

include 'eventmesh-filter-plugin'
include 'eventmesh-filter-plugin:eventmesh-filter-api'
include 'eventmesh-webhook:eventmesh-webhook-receive'

0 comments on commit 6f65d1a

Please sign in to comment.