karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject [1/2] karaf git commit: [KARAF-5024] Upgrade to JLine 3.2.0
Date Mon, 13 Mar 2017 10:31:03 GMT
Repository: karaf
Updated Branches:
  refs/heads/master aa784c189 -> ccd1ec69b


[KARAF-5024] Upgrade to JLine 3.2.0

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

Branch: refs/heads/master
Commit: cef708f00643a73ab31ebfe46253b68ef660bc81
Parents: aa784c1
Author: Guillaume Nodet <gnodet@apache.org>
Authored: Mon Mar 13 11:23:20 2017 +0100
Committer: Guillaume Nodet <gnodet@apache.org>
Committed: Mon Mar 13 11:23:20 2017 +0100

----------------------------------------------------------------------
 pom.xml                                                        | 2 +-
 .../org/apache/karaf/shell/impl/console/JLineTerminal.java     | 6 ++++++
 .../org/apache/karaf/shell/impl/console/KarafTerminal.java     | 6 +++++-
 3 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/cef708f0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f54bd92..0682edd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -249,7 +249,7 @@
         <hibernate.validator.version>5.3.4.Final</hibernate.validator.version>
         <jansi.version>1.14</jansi.version>
         <javassist.version>3.9.0.GA</javassist.version>
-        <jline.version>3.1.3</jline.version>
+        <jline.version>3.2.0</jline.version>
         <jsw.version>3.2.3</jsw.version>
         <log4j.version>1.2.17</log4j.version>
         <maven.version>2.0.9</maven.version>

http://git-wip-us.apache.org/repos/asf/karaf/blob/cef708f0/shell/core/src/main/java/org/apache/karaf/shell/impl/console/JLineTerminal.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/JLineTerminal.java
b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/JLineTerminal.java
index dc55c4b..214c860 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/JLineTerminal.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/JLineTerminal.java
@@ -28,6 +28,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.CopyOnWriteArraySet;
 import java.util.function.IntConsumer;
+import java.util.function.IntSupplier;
 
 import org.apache.karaf.shell.api.console.SignalListener;
 import org.apache.karaf.shell.api.console.Terminal;
@@ -235,6 +236,11 @@ public class JLineTerminal implements Terminal, org.jline.terminal.Terminal
{
         return terminal.readMouseEvent();
     }
 
+    @Override
+    public MouseEvent readMouseEvent(IntSupplier supplier) {
+        return terminal.readMouseEvent(supplier);
+    }
+
     private Signal signal(org.apache.karaf.shell.api.console.Signal sig) {
         switch (sig) {
             case INT:

http://git-wip-us.apache.org/repos/asf/karaf/blob/cef708f0/shell/core/src/main/java/org/apache/karaf/shell/impl/console/KarafTerminal.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/KarafTerminal.java
b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/KarafTerminal.java
index 169db55..b5004bc 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/KarafTerminal.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/KarafTerminal.java
@@ -51,7 +51,11 @@ public class KarafTerminal extends AbstractTerminal implements org.jline.termina
         try {
             caps = InfoCmp.getInfoCmp(type);
         } catch (Exception e) {
-            caps = InfoCmp.ANSI_CAPS;
+            try {
+                caps = InfoCmp.getInfoCmp("ansi");
+            } catch (InterruptedException e2) {
+                throw new UnsupportedOperationException(e2);
+            }
         }
         try {
             InfoCmp.parseInfoCmp(caps, bools, ints, strings);


Mime
View raw message