From c02865f72e8f37b51a2a430b75ab6fea1c7f7ed2 Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Mon, 7 Jul 2003 14:54:00 +0000 Subject: [PATCH] checkstyle changes git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274788 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/Project.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/org/apache/tools/ant/Project.java b/src/main/org/apache/tools/ant/Project.java index daee97823..e1ed96dfc 100644 --- a/src/main/org/apache/tools/ant/Project.java +++ b/src/main/org/apache/tools/ant/Project.java @@ -267,6 +267,7 @@ public class Project { /** * inits a sub project - used by taskdefs.Ant + * @param subProject the subproject to initialize */ public void initSubProject(Project subProject) { ComponentHelper.getComponentHelper(subProject) @@ -1479,9 +1480,9 @@ public class Project { * false otherwise. */ public static boolean toBoolean(String s) { - return (s.equalsIgnoreCase("on") || - s.equalsIgnoreCase("true") || - s.equalsIgnoreCase("yes")); + return (s.equalsIgnoreCase("on") + || s.equalsIgnoreCase("true") + || s.equalsIgnoreCase("yes")); } /** @@ -1978,17 +1979,17 @@ public class Project { * are called * @param obj the object to invoke setProject(this) on */ - public final void setProjectReference( final Object obj ) { - if ( obj instanceof ProjectComponent ) { - ( (ProjectComponent) obj ).setProject( this ); + public final void setProjectReference(final Object obj) { + if (obj instanceof ProjectComponent) { + ((ProjectComponent) obj).setProject(this); return; } try { Method method = obj.getClass().getMethod( - "setProject", new Class[] {Project.class} ); - if ( method != null ) { - method.invoke( obj, new Object[] { this } ); + "setProject", new Class[] {Project.class}); + if (method != null) { + method.invoke(obj, new Object[] {this}); } } catch (Throwable e) { // ignore this if the object does not have