2 Replies Latest reply on Apr 3, 2008 4:38 AM by Ales Justin

    Root cause with iDependOn equal null

    Ales Justin Master

      A bit related to this:
      - http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4140958#4140958

      In the case where iDependOn == null this is then used

      Object iDependOn = item.getIDependOn();
       if (iDependOn == null)
       {
       dependency = "<UNKNOWN>";
       actualStateString = "** UNRESOLVED " + item.toHumanReadableString() + " **";
       }
      

      Meaning (UNKNOWN) name is used for all dependencies that don't have iDependOn set.

      But when we look for root cause (see IncompleteDeployments::calculateContextsError)
       Map<String, Set<MissingDependency>> contextsMissingDependencies = getContextsMissingDependencies();
       if (contextsMissingDependencies.isEmpty() == false)
       {
       for (Map.Entry<String, Set<MissingDependency>> entry : contextsMissingDependencies.entrySet())
       {
       for (MissingDependency dependency : entry.getValue())
       rootCauses.put(dependency.getDependency(), dependency.getActualState());
       }
       }
      

      we use the name as key.
      So all (UNKNOWN) would be flattened into single entry.

      Should I add something like
       dependency = "<UNKNOWN " + GUID.asString() + ">";
      

      ?