Bug 36789

Summary: Empty control flow statement in org.apache.log4j.lf5.viewer.configure.ConfigurationManager
Product: Log4j - Now in Jira Reporter: Curtis Light <cmlight>
Component: OtherAssignee: log4j-dev <log4j-dev>
Status: NEEDINFO ---    
Severity: normal    
Priority: P2    
Version: 1.2   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Curtis Light 2005-09-23 21:01:52 UTC
See semicolon at end of last "if" statement below.

  protected void processCategories(Document doc) {
    CategoryExplorerTree tree = _monitor.getCategoryExplorerTree();
    CategoryExplorerModel model = tree.getExplorerModel();
    NodeList nodeList = doc.getElementsByTagName(CATEGORY);

    // determine where the starting node is
    NamedNodeMap map = nodeList.item(0).getAttributes();
    int j = (getValue(map, NAME).equalsIgnoreCase(FIRST_CATEGORY_NAME)) ? 1 : 0;
    // iterate backwards throught the nodeList so that expansion of the
    // list can occur
    for (int i = nodeList.getLength() - 1; i >= j; i--) {
      Node n = nodeList.item(i);
      map = n.getAttributes();
      CategoryNode chnode = model.addCategory(new CategoryPath(getValue(map,
PATH)));
      chnode.setSelected((getValue(map, SELECTED).equalsIgnoreCase("true")) ?
true : false);
      if (getValue(map, EXPANDED).equalsIgnoreCase("true")) ;
      tree.expandPath(model.getTreePathToRoot(chnode));
    }

  }
Comment 1 Curt Arnold 2006-08-01 20:08:54 UTC
Is the remedy: 

 -     if (getValue(map, EXPANDED).equalsIgnoreCase("true")) ;
      tree.expandPath(model.getTreePathToRoot(chnode));

or

      if (getValue(map, EXPANDED).equalsIgnoreCase("true")) {
          tree.expandPath(model.getTreePathToRoot(chnode));
      }

I'd guess the latter, but researching it would be at the very bottom of my list.