You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by ff...@apache.org on 2017/07/13 06:44:21 UTC

[1/2] karaf git commit: [KARAF-5247]java.lang.InterruptedException after logout command in shell

Repository: karaf
Updated Branches:
  refs/heads/master 87e785bf6 -> 2e9505340


[KARAF-5247]java.lang.InterruptedException after logout command in shell


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

Branch: refs/heads/master
Commit: 0f2b18176d551619e846282e3faaed6f646b7e51
Parents: e409ee5
Author: Freeman Fang <fr...@gmail.com>
Authored: Thu Jul 13 14:43:41 2017 +0800
Committer: Freeman Fang <fr...@gmail.com>
Committed: Thu Jul 13 14:43:41 2017 +0800

----------------------------------------------------------------------
 .../apache/karaf/shell/impl/console/ConsoleSessionImpl.java  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/0f2b1817/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 b500e9f..66802e4 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
@@ -365,7 +365,13 @@ public class ConsoleSessionImpl implements Session {
                         session.getConsole().println(session.format(result, Converter.INSPECT));
                     }
                 } catch (Throwable t) {
-                    ShellUtil.logException(this, t);
+                    if (!(command.endsWith("logout") && t instanceof InterruptedException)) {
+                        //command logout will interrupt this seesion thread, so this exception
+                        //is expected, don't need log it as a error message
+                        ShellUtil.logException(this, t);
+                    } else {
+                        LOGGER.debug("a console session is closed as the peer just logout");
+                    }
                 }
             }
             close();


[2/2] karaf git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/karaf

Posted by ff...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/karaf


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

Branch: refs/heads/master
Commit: 2e9505340434a85d256b0783c3720f0dc7ed5b1c
Parents: 0f2b181 87e785b
Author: Freeman Fang <fr...@gmail.com>
Authored: Thu Jul 13 14:43:57 2017 +0800
Committer: Freeman Fang <fr...@gmail.com>
Committed: Thu Jul 13 14:43:57 2017 +0800

----------------------------------------------------------------------
 itests/pom.xml                                                  | 3 +--
 .../src/test/java/org/apache/karaf/itests/KarafTestSupport.java | 5 +++++
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------