3 Replies Latest reply on Jul 10, 2009 11:21 AM by Ales Justin

    Wrong check in DeployersImpl.checkControllerContext()

    Kabir Khan Master

      This check looks wrong to me

       protected final void checkControllerContext(
       ControllerContext context,
       Map<String, Throwable> contextsInError,
       Map<String, Set<MissingDependency>> contextsMissingDependencies,
       ControllerStateModel states)
       {
       ,,,
       for (DependencyItem item : dependsInfo.getUnresolvedDependencies(nextState))
       {
       if (item.isResolved() == false)
       {
       ...
       //Wrong?
       ControllerState requiredState = item.getWhenRequired();
       String requiredStateString = requiredState.getStateString();
       if (actualState == null || states.isAfterState(requiredState, actualState))
       {
       MissingDependency missing = new MissingDependency(name, dependency, requiredStateString, actualStateString);
       dependencies.add(missing);
       }
       }
       }
       }
       contextsMissingDependencies.put(name, dependencies);
       }
       }
      

      Should we not be using the following instead
       ControllerState dependentState = item.getWhenDependentState();
       String dependentStateString = dependentState.getStateString();
       if (actualState == null || states.isAfterState(dependentState, actualState))