Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-3630

NPE in Karaf bundle:update command

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.3
    • 3.0.4
    • karaf
    • None

    Description

      If a user passes an invalid URL (for example a file path without file: scheme) the following exception is thrown:

      Exception caught while executing command
      java.lang.NullPointerException
       at org.apache.karaf.bundle.command.Update.doExecute(Update.java:39)
       at org.apache.karaf.bundle.command.BundleCommand.doExecute(BundleCommand.java:49)
       at org.apache.karaf.bundle.command.BundleCommandWithConfirmation.doExecute(BundleCommandWithConfirmation.java:34)
       at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)
       at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)
       at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)
      

      To provide a correct error the following class: org.apache.karaf.bundle.command.Update
      should contain the null checking in the finally block:

      if (is != null) {
          is.close();
      }
      

      Attachments

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            dnk Dmitry Konstantinov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: