You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding a header to a console-ui prompt, if the number of items in the header list is larger then the number of lines the terminal has to display, the program crashes. Here is the stack trace.
java.lang.IndexOutOfBoundsException: Index 74 out of bounds for length 5
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
at java.base/java.util.Objects.checkIndex(Objects.java:361)
at java.base/java.util.ArrayList.get(ArrayList.java:427)
at org.jline.consoleui.prompt.AbstractPrompt.displayLines(AbstractPrompt.java:152)
at org.jline.consoleui.prompt.AbstractPrompt.refreshDisplay(AbstractPrompt.java:116)
at org.jline.consoleui.prompt.AbstractPrompt$InputValuePrompt.execute(AbstractPrompt.java:587)
at org.jline.consoleui.prompt.ConsolePrompt.prompt(ConsolePrompt.java:121)
at org.jline.consoleui.examples.Basic.main(Basic.java:175)
I've attached a modified Basic.java example to demonstrate the problem. Basic.java.txt
The text was updated successfully, but these errors were encountered:
mattirn
added a commit
to mattirn/jline3
that referenced
this issue
Jun 25, 2024
gnodet
changed the title
console-ui crash when header exceeds size of the terminal
IndexOutOfBoundsException in console-ui when header exceeds size of the terminal
Jul 3, 2024
When adding a header to a console-ui prompt, if the number of items in the header list is larger then the number of lines the terminal has to display, the program crashes. Here is the stack trace.
java.lang.IndexOutOfBoundsException: Index 74 out of bounds for length 5
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
at java.base/java.util.Objects.checkIndex(Objects.java:361)
at java.base/java.util.ArrayList.get(ArrayList.java:427)
at org.jline.consoleui.prompt.AbstractPrompt.displayLines(AbstractPrompt.java:152)
at org.jline.consoleui.prompt.AbstractPrompt.refreshDisplay(AbstractPrompt.java:116)
at org.jline.consoleui.prompt.AbstractPrompt$InputValuePrompt.execute(AbstractPrompt.java:587)
at org.jline.consoleui.prompt.ConsolePrompt.prompt(ConsolePrompt.java:121)
at org.jline.consoleui.examples.Basic.main(Basic.java:175)
I've attached a modified Basic.java example to demonstrate the problem.
Basic.java.txt
The text was updated successfully, but these errors were encountered: