This is an automated email from the ASF dual-hosted git repository.

garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jelly.git


The following commit(s) were added to refs/heads/master by this push:
     new 1beabf0a Bump jline:jline from 0.9.5 to 2.14.6 (#104)
1beabf0a is described below

commit 1beabf0a2284f81e925f0a8b0dfd508144121530
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Tue Sep 8 07:38:24 2026 -0400

    Bump jline:jline from 0.9.5 to 2.14.6 (#104)
    
    * Bump jline:jline from 0.9.5 to 2.14.6
    
    Bumps [jline:jline](https://github.com/jline/jline2) from 0.9.5 to 2.14.6.
    - [Changelog](https://github.com/jline/jline2/blob/master/CHANGELOG.md)
    - [Commits](https://github.com/jline/jline2/commits/jline-2.14.6)
    
    ---
    updated-dependencies:
    - dependency-name: jline:jline
      dependency-version: 2.14.6
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    
    * Migrate interaction tag to JLine 2 API (#107)
    
    ---------
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Suraj Rajan <[email protected]>
---
 jelly-tags/interaction/pom.xml                        |  2 +-
 .../apache/commons/jelly/tags/interaction/AskTag.java | 19 ++++++++++++-------
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/jelly-tags/interaction/pom.xml b/jelly-tags/interaction/pom.xml
index 875eb205..618ee97e 100644
--- a/jelly-tags/interaction/pom.xml
+++ b/jelly-tags/interaction/pom.xml
@@ -40,7 +40,7 @@
     <dependency>
       <groupId>jline</groupId>
       <artifactId>jline</artifactId>
-      <version>0.9.5</version>
+      <version>2.14.6</version>
       <type>jar</type>
     </dependency>  
     <dependency>
diff --git 
a/jelly-tags/interaction/src/main/java/org/apache/commons/jelly/tags/interaction/AskTag.java
 
b/jelly-tags/interaction/src/main/java/org/apache/commons/jelly/tags/interaction/AskTag.java
index 01019a9f..5e099a68 100644
--- 
a/jelly-tags/interaction/src/main/java/org/apache/commons/jelly/tags/interaction/AskTag.java
+++ 
b/jelly-tags/interaction/src/main/java/org/apache/commons/jelly/tags/interaction/AskTag.java
@@ -27,9 +27,10 @@ import org.apache.commons.jelly.XMLOutput;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import jline.ConsoleReader;
-import jline.History;
-import jline.SimpleCompletor;
+import jline.console.ConsoleReader;
+import jline.console.completer.StringsCompleter;
+import jline.console.history.History;
+import jline.console.history.MemoryHistory;
 
   /**
   * Jelly Tag that asks the user a question, and puts his answer into a 
variable,
@@ -42,7 +43,7 @@ public class AskTag extends TagSupport {
     private static Log logger = LogFactory.getLog(AskTag.class);
 
     /** The history of previous user-inputs.*/
-    private static History consoleHistory = new History();
+    private static History consoleHistory = new MemoryHistory();
 
     /** The question to ask to the user. */
     private String question;
@@ -105,15 +106,19 @@ public class AskTag extends TagSupport {
                 consoleReader.setBellEnabled(false);
 
                 // add old commands as tab completion history
-                final List oldCommandsAsList = useHistoryCompletor
-                    ? new ArrayList(consoleHistory.getHistoryList()) : new 
ArrayList(0);
+                final List<String> oldCommandsAsList = new ArrayList<>();
+                if (useHistoryCompletor) {
+                    for (final History.Entry entry : consoleHistory) {
+                        oldCommandsAsList.add(entry.value().toString());
+                    }
+                }
                 // add predefined commands if given
                 if (completor != null && !completor.isEmpty()) {
                     oldCommandsAsList.addAll(completor);
                 }
                 final String[] oldCommands = new 
String[oldCommandsAsList.size()];
                 oldCommandsAsList.toArray(oldCommands);
-                consoleReader.addCompletor (new SimpleCompletor (oldCommands));
+                consoleReader.addCompleter(new StringsCompleter(oldCommands));
 
                 // read the input!
                 input = consoleReader.readLine();

Reply via email to