[jboss-cvs] JBossAS SVN: r96794 - projects/fresh/trunk/fresh-shell/src/main/java/org/jboss/fresh/shell/impl.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 24 03:27:53 EST 2009


Author: alesj
Date: 2009-11-24 03:27:53 -0500 (Tue, 24 Nov 2009)
New Revision: 96794

Modified:
   projects/fresh/trunk/fresh-shell/src/main/java/org/jboss/fresh/shell/impl/ShellImpl.java
Log:
Check for null context.

Modified: projects/fresh/trunk/fresh-shell/src/main/java/org/jboss/fresh/shell/impl/ShellImpl.java
===================================================================
--- projects/fresh/trunk/fresh-shell/src/main/java/org/jboss/fresh/shell/impl/ShellImpl.java	2009-11-24 06:56:14 UTC (rev 96793)
+++ projects/fresh/trunk/fresh-shell/src/main/java/org/jboss/fresh/shell/impl/ShellImpl.java	2009-11-24 08:27:53 UTC (rev 96794)
@@ -1949,6 +1949,6 @@
            return null;
 
         ControllerContext context = controller.getInstalledContext(type);
-        return type.cast(context.getTarget());
+        return context != null ? type.cast(context.getTarget()) : null;
     }
 }
\ No newline at end of file




More information about the jboss-cvs-commits mailing list