flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpe...@apache.org
Subject flume git commit: FLUME-2952. SyslogAgent: Avoid NPE on stop()
Date Thu, 14 Jul 2016 01:17:44 GMT
Repository: flume
Updated Branches:
  refs/heads/trunk ec28b6624 -> c7de4ba5c


FLUME-2952. SyslogAgent: Avoid NPE on stop()

Minor test bug fix

Reviewed by Hari.


Project: http://git-wip-us.apache.org/repos/asf/flume/repo
Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/c7de4ba5
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/c7de4ba5
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/c7de4ba5

Branch: refs/heads/trunk
Commit: c7de4ba5ca70c42099a2f9bf4ad2de3fdcbb7d30
Parents: ec28b66
Author: Mike Percy <mpercy@apache.org>
Authored: Mon Jul 11 19:53:50 2016 -0700
Committer: Mike Percy <mpercy@apache.org>
Committed: Wed Jul 13 18:17:13 2016 -0700

----------------------------------------------------------------------
 .../src/test/java/org/apache/flume/test/util/SyslogAgent.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/c7de4ba5/flume-ng-tests/src/test/java/org/apache/flume/test/util/SyslogAgent.java
----------------------------------------------------------------------
diff --git a/flume-ng-tests/src/test/java/org/apache/flume/test/util/SyslogAgent.java b/flume-ng-tests/src/test/java/org/apache/flume/test/util/SyslogAgent.java
index c908fc1..a2b0f3b 100644
--- a/flume-ng-tests/src/test/java/org/apache/flume/test/util/SyslogAgent.java
+++ b/flume-ng-tests/src/test/java/org/apache/flume/test/util/SyslogAgent.java
@@ -156,7 +156,9 @@ public class SyslogAgent {
   }
 
   public void stop() throws Exception {
-    client.close();
+    if (client != null) {
+      client.close();
+    }
     client = null;
 
     StagedInstall.getInstance().stopAgent();


Mime
View raw message