You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by "jbonofre (via GitHub)" <gi...@apache.org> on 2026/03/13 18:15:13 UTC

[PR] fix(shell): prevent LinkageError from killing the local console thread [karaf]

jbonofre opened a new pull request, #2313:
URL: https://github.com/apache/karaf/pull/2313

   When the JLine bundle is refreshed during runtime (e.g., due to feature install/update), the bundle classloader changes and AttributedString may be loaded by two different classloaders. This causes a LinkageError in ShellUtil.applyStyle().
   
   The logException() error handler only caught Exception, not Error, so the LinkageError escaped and killed the console thread. Broaden the catch to Throwable so classloading errors during exception display are handled gracefully.
   
   Also set command to empty string in readCommand()'s catch-all handler so transient errors re-prompt instead of exiting the session.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@karaf.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(shell): prevent LinkageError from killing the local console thread [karaf]

Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre merged PR #2313:
URL: https://github.com/apache/karaf/pull/2313


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@karaf.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org