commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcucchi...@apache.org
Subject svn commit: r1189632 - /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlContext.java
Date Thu, 27 Oct 2011 06:29:23 GMT
Author: mcucchiara
Date: Thu Oct 27 06:29:22 2011
New Revision: 1189632

URL: http://svn.apache.org/viewvc?rev=1189632&view=rev
Log:
Minor changes

Modified:
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlContext.java

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlContext.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlContext.java?rev=1189632&r1=1189631&r2=1189632&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlContext.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlContext.java Thu Oct
27 06:29:22 2011
@@ -24,7 +24,6 @@ import org.apache.commons.ognl.enhance.L
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Set;
@@ -114,11 +113,11 @@ public class OgnlContext
         {
             if ( ( s = System.getProperty( PROPERTY_KEY_PREFIX + ".traceEvaluations" ) )
!= null )
             {
-                DEFAULT_TRACE_EVALUATIONS = Boolean.valueOf( s.trim() ).booleanValue();
+                DEFAULT_TRACE_EVALUATIONS = Boolean.valueOf( s.trim() );
             }
             if ( ( s = System.getProperty( PROPERTY_KEY_PREFIX + ".keepLastEvaluation" )
) != null )
             {
-                DEFAULT_KEEP_LAST_EVALUATION = Boolean.valueOf( s.trim() ).booleanValue();
+                DEFAULT_KEEP_LAST_EVALUATION = Boolean.valueOf( s.trim() );
             }
         }
         catch ( SecurityException ex )
@@ -178,12 +177,7 @@ public class OgnlContext
 
     public void setValues( Map<String, Object> value )
     {
-        for ( Iterator<String> it = value.keySet().iterator(); it.hasNext(); )
-        {
-            String k = it.next();
-
-            _values.put( k, value.get( k ) );
-        }
+        _values.putAll( value );
     }
 
     public Map<String, Object> getValues()
@@ -706,12 +700,10 @@ public class OgnlContext
         return result;
     }
 
-    public void putAll( Map<? extends String, ? extends Object> t )
+    public void putAll( Map<? extends String, ?> t )
     {
-        for ( Iterator<? extends String> it = t.keySet().iterator(); it.hasNext();
)
+        for ( String k : t.keySet() )
         {
-            String k = it.next();
-
             put( k, t.get( k ) );
         }
     }



Mime
View raw message