|
From: <ri...@us...> - 2007-02-12 05:00:12
|
Revision: 44
http://techne-dev.svn.sourceforge.net/techne-dev/?rev=44&view=rev
Author: rickles
Date: 2007-02-11 21:00:13 -0800 (Sun, 11 Feb 2007)
Log Message:
-----------
Fixed NPE problem when framework command is typed in before setting the framework.
Modified Paths:
--------------
sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java
Modified: sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java
===================================================================
--- sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java 2007-02-12 00:31:10 UTC (rev 43)
+++ sandbox/rickles/org.digivitality.techne.shell/src/org/digivitality/techne/shell/Shell.java 2007-02-12 05:00:13 UTC (rev 44)
@@ -172,7 +172,7 @@
context = (BundleContext) getContext.invoke(systemBundle, null);
System.out.println("BundleContext: " + context);
- Class clazz = Class.forName("org.apache.felix.shell.ShellService");
+ //Class clazz = Class.forName("org.apache.felix.shell.ShellService");
Object[] args = {line, in, out};
ServiceReference ref = context.getServiceReference(ShellService.class.getName());
@@ -186,6 +186,9 @@
//Thread.currentThread().setContextClassLoader(clazz.getClassLoader());
//shell = ShellService.class.cast(o);
}
+ } catch (NullPointerException npe) {
+ logger.warn("Could not invoke execute method: ", npe);
+ System.out.println("Cannot execute framework command. Please select a framework.");
} catch (Exception e) {
e.printStackTrace();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|