[
https://issues.apache.org/jira/browse/KARAF-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065037#comment-13065037
]
Han Hong Fang commented on KARAF-735:
-------------------------------------
The problem only occurs if the FIRST command is EMPTY. Meanwhile, the problem
will disappear once a non-empty command has been issued.
Karaf works well if you issue non-empty command firstly. So I guess it is
non-related with the VC libraries.
I look into the karaf code. In
org.apache.karaf.shell.console.jline.Cosole.run() method, the problem occurs
here: reader.getHistory().replace(command); when the first command is empty,
history is with size 0, but replace() tries to remove the last item which leads
to java.util.NoSuchElementException.
> java.util.NoSuchElementException if issue the first command as an empty
> command
> -------------------------------------------------------------------------------
>
> Key: KARAF-735
> URL: https://issues.apache.org/jira/browse/KARAF-735
> Project: Karaf
> Issue Type: Bug
> Components: karaf-shell
> Affects Versions: 2.2.1, 2.2.2
> Environment: WinXP SP3 English
> Reporter: Han Hong Fang
>
> Steps to reproduce the problem.
> 1. downlaod apache-karaf-2.2.1.zip
> 2. extract it to folderA
> 3. go into the folderA\bin
> 4. issue karaf.bat
> 5. press enter and you get java.util.NoSuchElementException
> BTW: The exception disappears after any non-empty command like "list" being
> issued.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira