Skip to content

Commit

Permalink
[MINOR] Remove unused field in example (#766)
Browse files Browse the repository at this point in the history
  • Loading branch information
hezhangjian authored Feb 14, 2022
1 parent ed07425 commit 62eeb0e
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,10 @@
import java.io.IOException;
import java.io.InputStreamReader;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.sun.net.httpserver.HttpExchange;

public class NetUtils {

private static final Logger logger = LoggerFactory.getLogger(NetUtils.class);

public static String parsePostBody(HttpExchange exchange)
throws IOException {
StringBuilder body = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static void main(String[] args) throws Exception {
.password("pass")
.build();

try (EventMeshHttpProducer eventMeshHttpProducer = new EventMeshHttpProducer(eventMeshClientConfig);) {
try (EventMeshHttpProducer eventMeshHttpProducer = new EventMeshHttpProducer(eventMeshClientConfig)) {
for (int i = 0; i < messageSize; i++) {
Map<String, String> content = new HashMap<>();
content.put("content", "testPublishMessage");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ public class AsyncPublish {

private static EventMeshTCPClient<CloudEvent> client;

public static AsyncPublish handler = new AsyncPublish();

public static void main(String[] args) throws Exception {
Properties properties = Utils.readPropertiesFile("application.properties");
final String eventMeshIp = properties.getProperty("eventmesh.ip");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ public class AsyncPublish {

private static EventMeshTCPClient<EventMeshMessage> client;

public static AsyncPublish handler = new AsyncPublish();

public static void main(String[] args) throws Exception {
Properties properties = Utils.readPropertiesFile("application.properties");
final String eventMeshIp = properties.getProperty("eventmesh.ip");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private static String getLinuxLocalIp() {
enumIpAddr.hasMoreElements(); ) {
InetAddress inetAddress = enumIpAddr.nextElement();
if (!inetAddress.isLoopbackAddress()) {
String ipaddress = inetAddress.getHostAddress().toString();
String ipaddress = inetAddress.getHostAddress();
if (!ipaddress.contains("::") && !ipaddress.contains("0:0:")
&& !ipaddress.contains("fe80")) {
ip = ipaddress;
Expand Down

0 comments on commit 62eeb0e

Please sign in to comment.