commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1156105 - /commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/generator/util/EachElement.java
Date Wed, 10 Aug 2011 11:09:56 GMT
Author: simonetripodi
Date: Wed Aug 10 11:09:56 2011
New Revision: 1156105

URL: http://svn.apache.org/viewvc?rev=1156105&view=rev
Log:
used the if-else shortcut according to common style used in this class

Modified:
    commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/generator/util/EachElement.java

Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/generator/util/EachElement.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/generator/util/EachElement.java?rev=1156105&r1=1156104&r2=1156105&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/generator/util/EachElement.java
(original)
+++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/generator/util/EachElement.java
Wed Aug 10 11:09:56 2011
@@ -57,10 +57,7 @@ public final class EachElement {
      */
     @SuppressWarnings("unchecked")
     public static final <K, V> Generator<Map.Entry<K, V>> from(Map<?
extends K, ? extends V> map) {
-        if (map == null) {
-            return null;
-        }
-        return EachElement.from(((Map<K, V>) map).entrySet().iterator());
+        return map == null ? null : EachElement.from(((Map<K, V>) map).entrySet().iterator());
     }
 
     /**



Mime
View raw message