Bug 36789 - Empty control flow statement in org.apache.log4j.lf5.viewer.configure.ConfigurationManager
Summary: Empty control flow statement in org.apache.log4j.lf5.viewer.configure.Configu...
Status: NEEDINFO
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.2
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-23 21:01 UTC by Curtis Light
Modified: 2006-08-01 13:08 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.