commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r776665 - in /commons/proper/collections/trunk/src/java/org/apache/commons/collections: ExtendedProperties.java functors/PrototypeFactory.java
Date Wed, 20 May 2009 11:28:36 GMT
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
                 }



Mime
View raw message