You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2011/05/22 14:20:29 UTC
svn commit: r1125938 -
/incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/ListPropertyAccessor.java
Author: simonetripodi
Date: Sun May 22 12:20:29 2011
New Revision: 1125938
URL: http://svn.apache.org/viewvc?rev=1125938&view=rev
Log:
fixed List raw type
Modified:
incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/ListPropertyAccessor.java
Modified: incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/ListPropertyAccessor.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/ListPropertyAccessor.java?rev=1125938&r1=1125937&r2=1125938&view=diff
==============================================================================
--- incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/ListPropertyAccessor.java (original)
+++ incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/ListPropertyAccessor.java Sun May 22 12:20:29 2011
@@ -41,7 +41,7 @@ public class ListPropertyAccessor
public Object getProperty( Map<String, Object> context, Object target, Object name )
throws OgnlException
{
- List list = (List) target;
+ List<?> list = (List<?>) target;
if ( name instanceof String )
{
@@ -105,7 +105,8 @@ public class ListPropertyAccessor
return;
}
- List list = (List) target;
+ @SuppressWarnings( "unchecked" ) // check performed by the invoker
+ List<Object> list = (List<Object>) target;
if ( name instanceof Number )
{
@@ -141,7 +142,7 @@ public class ListPropertyAccessor
if ( !( value instanceof Collection ) )
throw new OgnlException( "Value must be a collection" );
list.clear();
- list.addAll( (Collection) value );
+ list.addAll( (Collection<?>) value );
return;
}
}