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(); }