ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgl...@apache.org
Subject svn commit: r1297161 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java
Date Mon, 05 Mar 2012 18:47:46 GMT
Author: jglick
Date: Mon Mar  5 18:47:46 2012
New Revision: 1297161

URL: http://svn.apache.org/viewvc?rev=1297161&view=rev
Log:
RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java?rev=1297161&r1=1297160&r2=1297161&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java Mon Mar  5 18:47:46
2012
@@ -442,17 +442,13 @@ public class Available extends Task impl
                 loader = getProject().createClassLoader(classpath);
                 loader.setParentFirst(false);
                 loader.addJavaLibraries();
-                if (loader != null) {
-                    try {
-                        loader.findClass(classname);
-                    } catch (SecurityException se) {
-                        // class found but restricted name; this is
-                        // actually the case we're looking for in JDK 1.3+,
-                        // so catch the exception and return
-                        return true;
-                    }
-                } else {
-                    return false;
+                try {
+                    loader.findClass(classname);
+                } catch (SecurityException se) {
+                    // class found but restricted name; this is
+                    // actually the case we're looking for in JDK 1.3+,
+                    // so catch the exception and return
+                    return true;
                 }
             } else if (loader != null) {
                 loader.loadClass(classname);



Mime
View raw message