felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Doornbosch (JIRA)" <j...@apache.org>
Subject [jira] Created: (FELIX-1057) stopping bundle causes NPE
Date Sat, 25 Apr 2009 10:02:30 GMT
stopping bundle causes NPE
--------------------------

                 Key: FELIX-1057
                 URL: https://issues.apache.org/jira/browse/FELIX-1057
             Project: Felix
          Issue Type: Bug
          Components: Remote Shell
    Affects Versions:  shell.remote-1.0.4
            Reporter: Peter Doornbosch
            Priority: Minor


Stopping the remote shell bundle itself remotely, causes a NPE:
Exception in thread "telnetconsole.shell remote=/127.0.0.1:56512" java.lang.NullPointerException
	at org.apache.felix.shell.remote.TerminalPrintStream.print(TerminalPrintStream.java:52)

I admit that stopping the bundle itself over the remote connection may seem like a silly use
case, but under circumstances it is necessary (to release the socket).

The NPE is causes by Activator.getServices() returning null. The fix is trivial:
ServiceMediator services = Activator.getServices();
if (services != null)
   services.error(...)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message