Browse Source

checkstyle changes

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274788 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 22 years ago
parent
commit
c02865f72e
1 changed files with 10 additions and 9 deletions
  1. +10
    -9
      src/main/org/apache/tools/ant/Project.java

+ 10
- 9
src/main/org/apache/tools/ant/Project.java View File

@@ -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 {
* <code>false</code> 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


Loading…
Cancel
Save