o MAVEN-282: Added missing braces to if statements

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@112953 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
bwalding committed 2003-02-18 14:21:35 +00:00
1 parent 2b3fc1d81b
commit e47d6647c9
1 file changed
+16 -2
+16 -2
View File
@@ -64,7 +64,7 @@ import org.dom4j.tree.DefaultElement;
/**
* @author <a href="bwalding@jakarta.org">Ben Walding</a>
* @version $Id: NavBean.java,v 1.2 2003/02/18 10:57:15 bwalding Exp $
* @version $Id: NavBean.java,v 1.3 2003/02/18 14:21:35 bwalding Exp $
*/
public class NavBean
{
@@ -80,7 +80,9 @@ public class NavBean
{
Attribute attr = elem.attribute(attribute);
if (attr == null)
{
return defaultValue;
}
return attr.getStringValue();
}
@@ -104,7 +106,9 @@ public class NavBean
{
//If we don't know where we are, collapse it - something outside of our knowledge
if (location == null)
{
return true;
}
if (!(o instanceof DefaultElement))
{
@@ -114,18 +118,24 @@ public class NavBean
DefaultElement elem = (DefaultElement) o;
boolean collapsed = getCollapseAttribute(elem);
if (!collapsed)
if (!collapsed)
{
return false;
}
if (isSelected(o))
{
return false;
}
String xpath = ".//item[@href='" + location + "']";
List l = elem.selectNodes(xpath);
if (l.size() != 0)
{
return false;
}
return true;
}
@@ -138,11 +148,15 @@ public class NavBean
public boolean isSelected(Object o)
{
if (location == null)
{
return false;
}
DefaultElement elem = (DefaultElement) o;
if (location.equals(getHREFAttribute(elem)))
{
return true;
}
return false;
}