From 08a0c403c0d5509c7e5755647ac02e0c58914ad1 Mon Sep 17 00:00:00 2001 From: vongosling Date: Tue, 29 Aug 2017 17:35:22 +0800 Subject: [PATCH] Polish --- .../impl/consumer/RebalanceService.java | 3 -- .../producer/LocalTransactionExecuter.java | 2 +- .../client/producer/SendCallback.java | 4 +-- .../org/apache/rocketmq/common/MixAll.java | 31 +++++++++++++------ .../remoting/common/RemotingUtil.java | 11 ++++--- style/rmq_checkstyle.xml | 2 +- 6 files changed, 33 insertions(+), 20 deletions(-) diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceService.java b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceService.java index c4d2951a..fab07cb3 100644 --- a/client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceService.java +++ b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceService.java @@ -21,9 +21,6 @@ import org.apache.rocketmq.client.log.ClientLogger; import org.apache.rocketmq.common.ServiceThread; import org.slf4j.Logger; -/** - * Rebalance Service - */ public class RebalanceService extends ServiceThread { private static long waitInterval = Long.parseLong(System.getProperty( diff --git a/client/src/main/java/org/apache/rocketmq/client/producer/LocalTransactionExecuter.java b/client/src/main/java/org/apache/rocketmq/client/producer/LocalTransactionExecuter.java index 0c22c3ea..80b55469 100644 --- a/client/src/main/java/org/apache/rocketmq/client/producer/LocalTransactionExecuter.java +++ b/client/src/main/java/org/apache/rocketmq/client/producer/LocalTransactionExecuter.java @@ -19,5 +19,5 @@ package org.apache.rocketmq.client.producer; import org.apache.rocketmq.common.message.Message; public interface LocalTransactionExecuter { - public LocalTransactionState executeLocalTransactionBranch(final Message msg, final Object arg); + LocalTransactionState executeLocalTransactionBranch(final Message msg, final Object arg); } diff --git a/client/src/main/java/org/apache/rocketmq/client/producer/SendCallback.java b/client/src/main/java/org/apache/rocketmq/client/producer/SendCallback.java index 1adf1834..a85fa699 100644 --- a/client/src/main/java/org/apache/rocketmq/client/producer/SendCallback.java +++ b/client/src/main/java/org/apache/rocketmq/client/producer/SendCallback.java @@ -17,7 +17,7 @@ package org.apache.rocketmq.client.producer; public interface SendCallback { - public void onSuccess(final SendResult sendResult); + void onSuccess(final SendResult sendResult); - public void onException(final Throwable e); + void onException(final Throwable e); } diff --git a/common/src/main/java/org/apache/rocketmq/common/MixAll.java b/common/src/main/java/org/apache/rocketmq/common/MixAll.java index c2a915a7..3a005e6a 100644 --- a/common/src/main/java/org/apache/rocketmq/common/MixAll.java +++ b/common/src/main/java/org/apache/rocketmq/common/MixAll.java @@ -16,20 +16,33 @@ */ package org.apache.rocketmq.common; -import org.apache.rocketmq.common.annotation.ImportantField; -import org.apache.rocketmq.common.constant.LoggerName; -import org.apache.rocketmq.common.help.FAQUrl; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.*; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; -import java.net.*; -import java.util.*; +import java.net.Inet6Address; +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.net.SocketException; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.List; +import java.util.Map; +import java.util.Properties; import java.util.concurrent.atomic.AtomicLong; +import org.apache.rocketmq.common.annotation.ImportantField; +import org.apache.rocketmq.common.constant.LoggerName; +import org.apache.rocketmq.common.help.FAQUrl; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class MixAll { private static final Logger log = LoggerFactory.getLogger(LoggerName.COMMON_LOGGER_NAME); diff --git a/remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingUtil.java b/remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingUtil.java index 2fe8752f..8d24e76b 100644 --- a/remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingUtil.java +++ b/remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingUtil.java @@ -19,17 +19,20 @@ package org.apache.rocketmq.remoting.common; import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFutureListener; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.io.IOException; import java.lang.reflect.Method; -import java.net.*; +import java.net.Inet6Address; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.NetworkInterface; +import java.net.SocketAddress; import java.nio.channels.Selector; import java.nio.channels.SocketChannel; import java.nio.channels.spi.SelectorProvider; import java.util.ArrayList; import java.util.Enumeration; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class RemotingUtil { public static final String OS_NAME = System.getProperty("os.name"); diff --git a/style/rmq_checkstyle.xml b/style/rmq_checkstyle.xml index a6edb24a..e93b353a 100644 --- a/style/rmq_checkstyle.xml +++ b/style/rmq_checkstyle.xml @@ -122,7 +122,7 @@ - + -- GitLab