You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2009/05/20 13:28:36 UTC

svn commit: r776665 - in /commons/proper/collections/trunk/src/java/org/apache/commons/collections: ExtendedProperties.java functors/PrototypeFactory.java

Author: sebb
Date: Wed May 20 11:28:36 2009
New Revision: 776665

URL: http://svn.apache.org/viewvc?rev=776665&view=rev
Log:
Remove redundant null checks

Modified:
    commons/proper/collections/trunk/src/java/org/apache/commons/collections/ExtendedProperties.java
    commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/PrototypeFactory.java

Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/ExtendedProperties.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/ExtendedProperties.java?rev=776665&r1=776664&r2=776665&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/ExtendedProperties.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/ExtendedProperties.java Wed May 20 11:28:36 2009
@@ -624,7 +624,7 @@
                             file = new File(basePath + value);
                         }
 
-                        if (file != null && file.exists() && file.canRead()) {
+                        if (file.exists() && file.canRead()) {
                             load(new FileInputStream(file));
                         }
                     } else {

Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/PrototypeFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/PrototypeFactory.java?rev=776665&r1=776664&r2=776665&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/PrototypeFactory.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/PrototypeFactory.java Wed May 20 11:28:36 2009
@@ -196,9 +196,7 @@
                     // ignore
                 }
                 try {
-                    if (baos != null) {
-                        baos.close();
-                    }
+                    baos.close();
                 } catch (IOException ex) {
                     // ignore
                 }