Browse Source

ws/javadoc/small code shrinkages

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@359316 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 19 years ago
parent
commit
23465a4909
1 changed files with 6 additions and 14 deletions
  1. +6
    -14
      src/main/org/apache/tools/ant/util/ClasspathUtils.java

+ 6
- 14
src/main/org/apache/tools/ant/util/ClasspathUtils.java View File

@@ -184,7 +184,6 @@ public class ClasspathUtils {
throw new BuildException("The specified loader id " + loaderId throw new BuildException("The specified loader id " + loaderId
+ " does not reference a class loader"); + " does not reference a class loader");
} }

cl = (ClassLoader) reusedLoader; cl = (ClassLoader) reusedLoader;
} }
if (cl == null) { if (cl == null) {
@@ -193,7 +192,6 @@ public class ClasspathUtils {
p.addReference(loaderId, cl); p.addReference(loaderId, cl);
} }
} }

return cl; return cl;
} }


@@ -219,7 +217,6 @@ public class ClasspathUtils {
acl.setParentFirst(false); acl.setParentFirst(false);
acl.addJavaLibraries(); acl.addJavaLibraries();
} }

return acl; return acl;
} }


@@ -352,7 +349,7 @@ public class ClasspathUtils {
* <li> attribute @classname </li></ul> * <li> attribute @classname </li></ul>
* *
* <p> This class functions as a delegate handling the configuration * <p> This class functions as a delegate handling the configuration
* issues for this recuring pattern. Its usage pattern, as the name
* issues for this recurring pattern. Its usage pattern, as the name
* suggests, is delegation rather than inheritance. </p> * suggests, is delegation rather than inheritance. </p>
* *
* @since Ant 1.6 * @since Ant 1.6
@@ -461,14 +458,12 @@ public class ClasspathUtils {
* @return The class loader. * @return The class loader.
*/ */
public ClassLoader getClassLoader() { public ClassLoader getClassLoader() {
ClassLoader cl;
cl = ClasspathUtils.getClassLoaderForPath(
return ClasspathUtils.getClassLoaderForPath(
getContextProject(), getContextProject(),
this.classpath, this.classpath,
getClassLoadId(), getClassLoadId(),
this.reverseLoader, this.reverseLoader,
loaderId != null || isMagicPropertySet(getContextProject())); loaderId != null || isMagicPropertySet(getContextProject()));
return cl;
} }


/** /**
@@ -483,11 +478,9 @@ public class ClasspathUtils {
* @return a loader identifier. * @return a loader identifier.
*/ */
public String getClassLoadId() { public String getClassLoadId() {
if (this.loaderId == null && this.classpathId != null) {
return ClasspathUtils.LOADER_ID_PREFIX + this.classpathId;
} else {
return this.loaderId;
}
return this.loaderId == null && this.classpathId != null
? ClasspathUtils.LOADER_ID_PREFIX + this.classpathId
: this.loaderId;
} }


/** /**
@@ -497,8 +490,7 @@ public class ClasspathUtils {
* @return the fresh instantiated object. * @return the fresh instantiated object.
*/ */
public Object newInstance() { public Object newInstance() {
ClassLoader cl = getClassLoader();
return ClasspathUtils.newInstance(this.className, cl);
return ClasspathUtils.newInstance(this.className, getClassLoader());
} }


/** /**


Loading…
Cancel
Save