commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1126137 - /incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/MapPropertyAccessor.java
Date Sun, 22 May 2011 17:56:02 GMT
Author: simonetripodi
Date: Sun May 22 17:56:02 2011
New Revision: 1126137

URL: http://svn.apache.org/viewvc?rev=1126137&view=rev
Log:
typed the input target

Modified:
    incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/MapPropertyAccessor.java

Modified: incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/MapPropertyAccessor.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/MapPropertyAccessor.java?rev=1126137&r1=1126136&r2=1126137&view=diff
==============================================================================
--- incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/MapPropertyAccessor.java (original)
+++ incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/MapPropertyAccessor.java Sun
May 22 17:56:02 2011
@@ -37,7 +37,8 @@ public class MapPropertyAccessor
         throws OgnlException
     {
         Object result;
-        Map map = (Map) target;
+        @SuppressWarnings( "unchecked" ) // checked by the invoker
+        Map<Object, Object> map = (Map<Object, Object>) target;
         Node currentNode = ( (OgnlContext) context ).getCurrentNode().jjtGetParent();
         boolean indexedAccess = false;
 
@@ -97,7 +98,8 @@ public class MapPropertyAccessor
     public void setProperty( Map<String, Object> context, Object target, Object name,
Object value )
         throws OgnlException
     {
-        Map map = (Map) target;
+        @SuppressWarnings( "unchecked" ) // checked by the invoker
+        Map<Object, Object> map = (Map<Object, Object>) target;
         map.put( name, value );
     }
 



Mime
View raw message