[jboss-cvs] JBossAS SVN: r71591 - 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
Wed Apr 2 08:08:12 EDT 2008


Author: alesj
Date: 2008-04-02 08:08:12 -0400 (Wed, 02 Apr 2008)
New Revision: 71591

Modified:
   projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/AbstractKernelDeployer.java
Log:
Small optimization.

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	2008-04-02 12:06:02 UTC (rev 71590)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/deployment/AbstractKernelDeployer.java	2008-04-02 12:08:12 UTC (rev 71591)
@@ -239,45 +239,47 @@
                      ControllerState otherState = null;
                      ControllerContext other = null; 
                      Object iDependOn = item.getIDependOn();
-                     if (iDependOn != null)
-                     {
-                        other = controller.getContext(iDependOn, null);
-                        if (other != null)
-                           otherState = other.getState();
-                     }
 
-                     boolean print = true;
-                     if (name.equals(iDependOn))
-                        print = false;
-                     if (otherState != null && otherState.equals(ControllerState.ERROR) == false)
+                     if (name.equals(iDependOn) == false)
                      {
-                        int index1 = states.indexOf(dependentState);
-                        int index2 = states.indexOf(otherState);
-                        if (index2 >= index1)
-                           print = false;
-                     }
-                      
-                     if (print)
-                     {
-                        if (first)
-                           first = false;
-                        else
-                           buffer.append(", ");
-                        
-                        buffer.append(iDependOn).append('{').append(dependentState.getStateString());
-                        buffer.append(':');
-                        if (iDependOn == null)
+                        if (iDependOn != null)
                         {
-                           buffer.append("** UNRESOLVED " + item.toHumanReadableString() + " **");
+                           other = controller.getContext(iDependOn, null);
+                           if (other != null)
+                              otherState = other.getState();
                         }
-                        else
+
+                        boolean print = true;
+                        if (otherState != null && otherState.equals(ControllerState.ERROR) == false)
                         {
-                           if (other == null)
-                              buffer.append("** NOT FOUND **");
+                           int index1 = states.indexOf(dependentState);
+                           int index2 = states.indexOf(otherState);
+                           if (index2 >= index1)
+                              print = false;
+                        }
+
+                        if (print)
+                        {
+                           if (first)
+                              first = false;
                            else
-                              buffer.append(otherState.getStateString());
+                              buffer.append(", ");
+
+                           buffer.append(iDependOn).append('{').append(dependentState.getStateString());
+                           buffer.append(':');
+                           if (iDependOn == null)
+                           {
+                              buffer.append("** UNRESOLVED " + item.toHumanReadableString() + " **");
+                           }
+                           else
+                           {
+                              if (other == null)
+                                 buffer.append("** NOT FOUND **");
+                              else
+                                 buffer.append(otherState.getStateString());
+                           }
+                           buffer.append('}');
                         }
-                        buffer.append('}');
                      }
                   }
                   buffer.append('\n');




More information about the jboss-cvs-commits mailing list