Author: mbenson
Date: Tue Dec 27 14:57:02 2005
New Revision: 359316

URL: http://svn.apache.org/viewcvs?rev=359316&view=rev
Log:
ws/javadoc/small code shrinkages

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/util/ClasspathUtils.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/ClasspathUtils.java
URL: 
http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/util/ClasspathUtils.java?rev=359316&r1=359315&r2=359316&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/ClasspathUtils.java 
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/ClasspathUtils.java Tue 
Dec 27 14:57:02 2005
@@ -184,7 +184,6 @@
                 throw new BuildException("The specified loader id " + loaderId
                     + " does not reference a class loader");
             }
-
             cl = (ClassLoader) reusedLoader;
         }
         if (cl == null) {
@@ -193,7 +192,6 @@
                 p.addReference(loaderId, cl);
             }
         }
-
         return cl;
     }
 
@@ -219,7 +217,6 @@
             acl.setParentFirst(false);
             acl.addJavaLibraries();
         }
-
         return acl;
     }
 
@@ -352,7 +349,7 @@
      * <li> attribute @classname </li></ul>
      *
      * <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>
      *
      * @since Ant 1.6
@@ -461,14 +458,12 @@
          * @return The class loader.
          */
         public ClassLoader getClassLoader() {
-            ClassLoader cl;
-            cl = ClasspathUtils.getClassLoaderForPath(
+            return ClasspathUtils.getClassLoaderForPath(
                     getContextProject(),
                     this.classpath,
                     getClassLoadId(),
                     this.reverseLoader,
                     loaderId != null || 
isMagicPropertySet(getContextProject()));
-            return cl;
         }
 
         /**
@@ -483,11 +478,9 @@
          * @return a loader identifier.
          */
         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 @@
          * @return the fresh instantiated object.
          */
         public Object newInstance() {
-            ClassLoader cl = getClassLoader();
-            return ClasspathUtils.newInstance(this.className, cl);
+            return ClasspathUtils.newInstance(this.className, 
getClassLoader());
         }
 
         /**



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to