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/07/15 10:31:25 UTC

[1/2] git commit: [KARAF-3117] The console welcome message is garbled when the console is restarted

Repository: karaf
Updated Branches:
  refs/heads/karaf-3.0.x 62267e307 -> 1128ab7f0


[KARAF-3117] The console welcome message is garbled when the console is restarted


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

Branch: refs/heads/karaf-3.0.x
Commit: 69cd0d0e99e339fa4a705c55d07f15d3f02d215e
Parents: 62267e3
Author: Guillaume Nodet <gn...@gmail.com>
Authored: Tue Jul 15 10:01:07 2014 +0200
Committer: Guillaume Nodet <gn...@gmail.com>
Committed: Tue Jul 15 10:28:11 2014 +0200

----------------------------------------------------------------------
 .../java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/69cd0d0e/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java b/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
index 24a7277..7404465 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
@@ -171,6 +171,7 @@ public class ConsoleImpl implements Console {
         if (!running) {
             return;
         }
+        out.println();
         if (reader.getHistory() instanceof PersistentHistory) {
             try {
                 ((PersistentHistory) reader.getHistory()).flush();


[2/2] git commit: [KARAF-2878] The thread reading the system input stream should exit automatically when the console bundle stops

Posted by gn...@apache.org.
[KARAF-2878] The thread reading the system input stream should exit automatically when the console bundle stops

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

Branch: refs/heads/karaf-3.0.x
Commit: 1128ab7f0361d8806d9f15edeccf67d2b277b468
Parents: 69cd0d0
Author: Guillaume Nodet <gn...@gmail.com>
Authored: Tue Jul 15 10:31:03 2014 +0200
Committer: Guillaume Nodet <gn...@gmail.com>
Committed: Tue Jul 15 10:31:03 2014 +0200

----------------------------------------------------------------------
 .../org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/1128ab7f/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java b/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
index 7404465..ea54554 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
@@ -486,6 +486,12 @@ public class ConsoleImpl implements Console {
             try {
                 while (running) {
                     try {
+                        while (in.available() == 0) {
+                            if (!running) {
+                                return;
+                            }
+                            Thread.sleep(50);
+                        }
                         int c = in.read();
                         if (c == -1) {
                             return;