You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by gn...@apache.org on 2014/03/06 01:40:05 UTC

[2/6] git commit: [KARAF-2773] Refreshing the console bundle closes karaf Regression with the new console. Also, make sure that we usually end up on a new line after stopping the console so that in case of a restart, the banner is correctly displayed.

[KARAF-2773] Refreshing the console bundle closes karaf
Regression with the new console.
Also, make sure that we usually end up on a new line after stopping the console so that in case of a restart, the banner is correctly displayed.

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

Branch: refs/heads/master
Commit: 7ccf13cc63e8949354db1ff50f3f404aa2ba9e4d
Parents: bc7bf92
Author: Guillaume Nodet <gn...@gmail.com>
Authored: Thu Mar 6 00:55:49 2014 +0100
Committer: Guillaume Nodet <gn...@gmail.com>
Committed: Thu Mar 6 00:55:49 2014 +0100

----------------------------------------------------------------------
 .../org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java  | 4 +++-
 .../java/org/apache/karaf/shell/impl/console/osgi/Activator.java | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/7ccf13cc/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 7988035..0bf75f0 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
@@ -213,6 +213,7 @@ public class ConsoleSessionImpl implements Session {
         if (!running) {
             return;
         }
+        out.println();
         if (reader.getHistory() instanceof PersistentHistory) {
             try {
                 ((PersistentHistory) reader.getHistory()).flush();
@@ -558,7 +559,8 @@ public class ConsoleSessionImpl implements Session {
                         if (c == -1) {
                             return;
                         } else if (c == 4 && !ShellUtil.getBoolean(ConsoleSessionImpl.this, Session.IGNORE_INTERRUPTS)) {
-                            err.println("^D");
+                            err.print("^D");
+                            err.flush();
                             return;
                         } else if (c == 3 && !ShellUtil.getBoolean(ConsoleSessionImpl.this, Session.IGNORE_INTERRUPTS)) {
                             err.println("^C");

http://git-wip-us.apache.org/repos/asf/karaf/blob/7ccf13cc/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/Activator.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/Activator.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/Activator.java
index 921dca3..1dba465 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/Activator.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/osgi/Activator.java
@@ -69,8 +69,8 @@ public class Activator implements BundleActivator {
     @Override
     public void stop(BundleContext context) throws Exception {
         sessionFactoryRegistration.unregister();
-        sessionFactory.stop();
         localConsoleManager.stop();
+        sessionFactory.stop();
         actionExtender.stop(context);
         threadIO.stop();
         terminalFactory.destroy();