commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1126695 - /incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java
Date Mon, 23 May 2011 19:54:34 GMT
Author: simonetripodi
Date: Mon May 23 19:54:33 2011
New Revision: 1126695

URL: http://svn.apache.org/viewvc?rev=1126695&view=rev
Log:
fixed internal getPermission(Method) cache raw types

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

Modified: incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java?rev=1126695&r1=1126694&r2=1126695&view=diff
==============================================================================
--- incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java (original)
+++ incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java Mon May 23
19:54:33 2011
@@ -825,13 +825,13 @@ public class OgnlRuntime
 
         synchronized ( _invokePermissionCache )
         {
-            Map permissions = (Map) _invokePermissionCache.get( mc );
+            Map<String, Permission> permissions = _invokePermissionCache.get( mc );
 
             if ( permissions == null )
             {
-                _invokePermissionCache.put( mc, permissions = new HashMap( 101 ) );
+                _invokePermissionCache.put( mc, permissions = new HashMap<String, Permission>(
101 ) );
             }
-            if ( ( result = (Permission) permissions.get( method.getName() ) ) == null )
+            if ( ( result = permissions.get( method.getName() ) ) == null )
             {
                 result = new OgnlInvokePermission( "invoke." + mc.getName() + "." + method.getName()
);
                 permissions.put( method.getName(), result );



Mime
View raw message