[
https://issues.apache.org/jira/browse/CAMEL-27840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-27840:
--------------------------------
Description:
Found while improving the option descriptions of camel-shell for CAMEL-23832
(commit
https://github.com/apache/camel/commit/d706f57a8fb08065b46a08a0acbc00620fd890d7,
pull request https://github.com/apache/camel/pull/31142).
This is a separate problem of the component; the descriptions change only
documents the current behavior.
h4. Ctrl+D logs an ERROR
In {{ShellConsumer.run()}} the line == null branch is dead code: JLine 4.7.0
LineReader.readLine never returns null, but throws EndOfFileException on Ctrl+D
and UserInterruptException on Ctrl+C. Both go to the generic catch, which logs
"Error reading line from shell" at ERROR with a stack trace before it stops the
CamelContext.
Proposed change: catch EndOfFileException (and UserInterruptException) and exit
quietly.
_Claude Code on behalf of davsclaus_
was:
Found while improving the option descriptions of camel-shell for CAMEL-23832
(pull request https://github.com/apache/camel/pull/31142).
This is a separate problem of the component; the descriptions change only
documents the current behavior.
h4. Ctrl+D logs an ERROR
In {{ShellConsumer.run()}} the line == null branch is dead code: JLine 4.7.0
LineReader.readLine never returns null, but throws EndOfFileException on Ctrl+D
and UserInterruptException on Ctrl+C. Both go to the generic catch, which logs
"Error reading line from shell" at ERROR with a stack trace before it stops the
CamelContext.
Proposed change: catch EndOfFileException (and UserInterruptException) and exit
quietly.
_Claude Code on behalf of davsclaus_
> camel-shell: a normal Ctrl+D exit logs an ERROR with a stack trace
> ------------------------------------------------------------------
>
> Key: CAMEL-27840
> URL: https://issues.apache.org/jira/browse/CAMEL-27840
> Project: Camel
> Issue Type: Bug
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-shell for CAMEL-23832
> (commit
> https://github.com/apache/camel/commit/d706f57a8fb08065b46a08a0acbc00620fd890d7,
> pull request https://github.com/apache/camel/pull/31142).
> This is a separate problem of the component; the descriptions change only
> documents the current behavior.
> h4. Ctrl+D logs an ERROR
> In {{ShellConsumer.run()}} the line == null branch is dead code: JLine 4.7.0
> LineReader.readLine never returns null, but throws EndOfFileException on
> Ctrl+D and UserInterruptException on Ctrl+C. Both go to the generic catch,
> which logs "Error reading line from shell" at ERROR with a stack trace before
> it stops the CamelContext.
> Proposed change: catch EndOfFileException (and UserInterruptException) and
> exit quietly.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)