karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-4960) Karaf exits when typing "la |"
Date Fri, 27 Jan 2017 14:03:24 GMT

    [ https://issues.apache.org/jira/browse/KARAF-4960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15842897#comment-15842897
] 

ASF subversion and git services commented on KARAF-4960:
--------------------------------------------------------

Commit 90ef2e8196fa36bc4ddb93e342624a3845eb0bca in karaf's branch refs/heads/master from [~chris@die-schneider.net]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=90ef2e8 ]

[KARAF-4960] Checking number of tokens to avoid karaf crash


> Karaf exits when typing "la |"
> ------------------------------
>
>                 Key: KARAF-4960
>                 URL: https://issues.apache.org/jira/browse/KARAF-4960
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 4.1.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 4.1.0
>
>
> When typing any command and just "|" at the end karaf completely exits.
> There is the stacktrace below in the log.
> I found that this is because of a unprotected access to the first token of the parsed
command.
> 2017-01-27T14:52:22,844 | ERROR | Karaf local console user karaf | ShellUtil        
               | 43 - org.apache.karaf.shell.core - 4.1.0.SNAPSHOT | Exception caught while
executing command
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
> 	at java.util.ArrayList.rangeCheck(ArrayList.java:653) [?:?]
> 	at java.util.ArrayList.get(ArrayList.java:429) [?:?]
> 	at org.apache.karaf.shell.impl.console.parsing.KarafParser.doParse(KarafParser.java:78)
[43:org.apache.karaf.shell.core:4.1.0.SNAPSHOT]
> 	at org.apache.karaf.shell.impl.console.parsing.KarafParser.parse(KarafParser.java:49)
[43:org.apache.karaf.shell.core:4.1.0.SNAPSHOT]
> 	at org.jline.reader.impl.LineReaderImpl.insertSecondaryPrompts(LineReaderImpl.java:3430)
[50:org.jline:3.1.2]
> 	at org.jline.reader.impl.LineReaderImpl.insertSecondaryPrompts(LineReaderImpl.java:3387)
[50:org.jline:3.1.2]
> 	at org.jline.reader.impl.LineReaderImpl.getDisplayedBufferWithPrompts(LineReaderImpl.java:3268)
[50:org.jline:3.1.2]
> 	at org.jline.reader.impl.LineReaderImpl.redisplay(LineReaderImpl.java:3203) [50:org.jline:3.1.2]
> 	at org.jline.reader.impl.LineReaderImpl.cleanup(LineReaderImpl.java:2180) [50:org.jline:3.1.2]
> 	at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:570) [50:org.jline:3.1.2]
> 	at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:332)
[43:org.apache.karaf.shell.core:4.1.0.SNAPSHOT]
> 	at java.lang.Thread.run(Thread.java:745) [?:?]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message