You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2017/08/02 05:45:39 UTC

karaf git commit: [KARAF-5051] Prevent NPE if the console is executed via the shell script

Repository: karaf
Updated Branches:
  refs/heads/master a4d996815 -> f75ade9f2


[KARAF-5051] Prevent NPE if the console is executed via the shell script


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

Branch: refs/heads/master
Commit: f75ade9f2be418a7191df7ca1c4ab32c12b5a279
Parents: a4d9968
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Wed Aug 2 07:45:10 2017 +0200
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Wed Aug 2 07:45:10 2017 +0200

----------------------------------------------------------------------
 .../org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/f75ade9f/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java
index f787f31..0f30c3f 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java
@@ -290,7 +290,7 @@ public class ConsoleSessionImpl implements Session {
             }
 
             running = false;
-            if (thread != Thread.currentThread()) {
+            if (thread != Thread.currentThread() && thread != null) {
                 thread.interrupt();
             }
             if (closeCallback != null) {