rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ding...@apache.org
Subject [rocketmq] branch develop updated: [ISSUE #1241]optimize the codes for issue that Suggestion about the third part dependency of the RocketMQ client. (#1264)
Date Mon, 17 Jun 2019 11:01:10 GMT
This is an automated email from the ASF dual-hosted git repository.

dinglei pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new ac7b16d  [ISSUE #1241]optimize the codes for issue that Suggestion about the third
part dependency of the RocketMQ client. (#1264)
ac7b16d is described below

commit ac7b16da980b0da04b155a47951678cbae4170df
Author: Hu Zongtang <huzongtang@cmss.chinamobile.com>
AuthorDate: Mon Jun 17 19:00:59 2019 +0800

    [ISSUE #1241]optimize the codes for issue that Suggestion about the third part dependency
of the RocketMQ client. (#1264)
---
 filter/pom.xml                                                        | 4 ++++
 srvutil/pom.xml                                                       | 4 ----
 .../src/main/java/org/apache/rocketmq/srvutil/FileWatchService.java   | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/filter/pom.xml b/filter/pom.xml
index b203620..7f33e99 100644
--- a/filter/pom.xml
+++ b/filter/pom.xml
@@ -37,5 +37,9 @@
             <groupId>${project.groupId}</groupId>
             <artifactId>rocketmq-srvutil</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
     </dependencies>
 </project>
\ No newline at end of file
diff --git a/srvutil/pom.xml b/srvutil/pom.xml
index bf3f11c..d616edd 100644
--- a/srvutil/pom.xml
+++ b/srvutil/pom.xml
@@ -41,9 +41,5 @@
             <groupId>commons-cli</groupId>
             <artifactId>commons-cli</artifactId>
         </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
     </dependencies>
 </project>
diff --git a/srvutil/src/main/java/org/apache/rocketmq/srvutil/FileWatchService.java b/srvutil/src/main/java/org/apache/rocketmq/srvutil/FileWatchService.java
index adf61ad..111cede 100644
--- a/srvutil/src/main/java/org/apache/rocketmq/srvutil/FileWatchService.java
+++ b/srvutil/src/main/java/org/apache/rocketmq/srvutil/FileWatchService.java
@@ -17,7 +17,6 @@
 
 package org.apache.rocketmq.srvutil;
 
-import com.google.common.base.Strings;
 import java.io.File;
 import java.io.IOException;
 import java.nio.file.Files;
@@ -27,6 +26,7 @@ import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.util.ArrayList;
 import java.util.List;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.rocketmq.common.ServiceThread;
 import org.apache.rocketmq.common.UtilAll;
 import org.apache.rocketmq.common.constant.LoggerName;
@@ -49,7 +49,7 @@ public class FileWatchService extends ServiceThread {
         this.fileCurrentHash = new ArrayList<>();
 
         for (int i = 0; i < watchFiles.length; i++) {
-            if (!Strings.isNullOrEmpty(watchFiles[i]) && new File(watchFiles[i]).exists())
{
+            if (StringUtils.isNotEmpty(watchFiles[i]) && new File(watchFiles[i]).exists())
{
                 this.watchFiles.add(watchFiles[i]);
                 this.fileCurrentHash.add(hash(watchFiles[i]));
             }


Mime
View raw message