Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-2009

IOException in aesh console initialization results in NPE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 8.0.0.Beta1
    • 8.0.0.Alpha4
    • CLI
    • None

      In source file org.jboss.as.cli.impl.Console, method Factory.getConsole:
      if the constructor call "new org.jboss.aesh.console.Console()" leads to an IOException, it is only logged and then ignored, always yielding a NullPointerException just a few lines later (console.addCompletion(new Completion() ...)

      I think the IOException should rather be rethrown wrapped in a CliInitializationException, so the resulting exception will not lose track of why this happened. Allowing a NPE go out of the internals is a wrong approach.

              jmartisk@redhat.com Jan Martiska
              jmartisk@redhat.com Jan Martiska
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: