You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2014/01/20 05:11:19 UTC

[jira] [Created] (KARAF-2694) NPE when use osgi:uninstall

Freeman Fang created KARAF-2694:
-----------------------------------

             Summary: NPE when use osgi:uninstall
                 Key: KARAF-2694
                 URL: https://issues.apache.org/jira/browse/KARAF-2694
             Project: Karaf
          Issue Type: Bug
            Reporter: Freeman Fang


if use 
uninstall null
we get NPE like
{code}
2014-01-20 12:08:35,176 | ERROR | l Console Thread | Console                          | araf.shell.console.jline.Console  202 | 14 - org.apache.karaf.shell.console - 2.3.4.SNAPSHOT | Exception caught while executing command
java.lang.NullPointerException
	at java.util.regex.Matcher.getTextLength(Matcher.java:1234)[:1.7.0_07]
	at java.util.regex.Matcher.reset(Matcher.java:308)[:1.7.0_07]
	at java.util.regex.Matcher.<init>(Matcher.java:228)[:1.7.0_07]
	at java.util.regex.Pattern.matcher(Pattern.java:1088)[:1.7.0_07]
	at org.apache.karaf.shell.osgi.BundleSelector.selectBundles(BundleSelector.java:46)[24:org.apache.karaf.shell.osgi:2.3.3]
	at org.apache.karaf.shell.osgi.BundlesCommand.doExecute(BundlesCommand.java:36)[24:org.apache.karaf.shell.osgi:2.3.3]
	at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[14:org.apache.karaf.shell.console:2.3.4.SNAPSHOT]
	at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[14:org.apache.karaf.shell.console:2.3.4.SNAPSHOT]
	at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[14:org.apache.karaf.shell.console:2.3.4.SNAPSHOT]
	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[14:org.apache.karaf.shell.console:2.3.4.SNAPSHOT]
	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[14:org.apache.karaf.shell.console:2.3.4.SNAPSHOT]
	at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[14:org.apache.karaf.shell.console:2.3.4.SNAPSHOT]
	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[14:org.apache.karaf.shell.console:2.3.4.SNAPSHOT]
	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[14:org.apache.karaf.shell.console:2.3.4.SNAPSHOT]
	at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[14:org.apache.karaf.shell.console:2.3.4.SNAPSHOT]
	at org.apache.karaf.shell.console.jline.Console.run(Console.java:173)[14:org.apache.karaf.shell.console:2.3.4.SNAPSHOT]
	at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
{code}

Should add a NPE guard here



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)