[Jboss-cvs] JBossAS SVN: r55502 - projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Aug 10 16:47:25 EDT 2006


Author: adrian at jboss.org
Date: 2006-08-10 16:47:23 -0400 (Thu, 10 Aug 2006)
New Revision: 55502

Modified:
   projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/AbstractKernelDeployer.java
Log:
[JBMICROCONT-101] - Fix "NPE" in error reporting when a Demand is
not resolved.

Modified: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/AbstractKernelDeployer.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/AbstractKernelDeployer.java	2006-08-10 20:43:16 UTC (rev 55501)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/AbstractKernelDeployer.java	2006-08-10 20:47:23 UTC (rev 55502)
@@ -226,11 +226,20 @@
                      DependencyItem item = (DependencyItem) j.next();
                      buffer.append(item.getIDependOn()).append('{').append(item.getWhenRequired().getStateString());
                      buffer.append(':');
-                     ControllerContext other = controller.getContext(item.getIDependOn(), null);
-                     if (other == null)
-                        buffer.append("** NOT FOUND **");
+                     Object iDependOn = item.getIDependOn();
+                     if (iDependOn == null)
+                     {
+                        // FIXME needs to print something better than item.toString()
+                        buffer.append("** UNRESOLVED " + item + " **");
+                     }
                      else
-                        buffer.append(other.getState().getStateString());
+                     {
+                        ControllerContext other = controller.getContext(item.getIDependOn(), null);
+                        if (other == null)
+                           buffer.append("** NOT FOUND **");
+                        else
+                           buffer.append(other.getState().getStateString());
+                     }
                      buffer.append('}');
                      if (j.hasNext())
                         buffer.append(", ");




More information about the jboss-cvs-commits mailing list