Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 06E7F4849 for ; Mon, 23 May 2011 07:49:19 +0000 (UTC) Received: (qmail 74440 invoked by uid 500); 23 May 2011 07:49:18 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 74388 invoked by uid 500); 23 May 2011 07:49:18 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 74381 invoked by uid 99); 23 May 2011 07:49:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 May 2011 07:49:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 May 2011 07:49:15 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A98F023888C2; Mon, 23 May 2011 07:48:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1126361 - /incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java Date: Mon, 23 May 2011 07:48:54 -0000 To: commits@commons.apache.org From: simonetripodi@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110523074854.A98F023888C2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: simonetripodi Date: Mon May 23 07:48:54 2011 New Revision: 1126361 URL: http://svn.apache.org/viewvc?rev=1126361&view=rev Log: fixed raw types in findObjectIndexedPropertyDescriptors() method 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=1126361&r1=1126360&r2=1126361&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 07:48:54 2011 @@ -2102,11 +2102,11 @@ public class OgnlRuntime return result; } - static void findObjectIndexedPropertyDescriptors( Class targetClass, Map intoMap ) + static void findObjectIndexedPropertyDescriptors( Class targetClass, Map intoMap ) throws OgnlException { Map> allMethods = getMethods( targetClass, false ); - Map pairs = new HashMap( 101 ); + Map> pairs = new HashMap>( 101 ); for ( Iterator it = allMethods.keySet().iterator(); it.hasNext(); ) { @@ -2131,21 +2131,21 @@ public class OgnlRuntime if ( isGet && ( parameterCount == 1 ) && ( m.getReturnType() != Void.TYPE ) ) { - List pair = (List) pairs.get( propertyName ); + List pair = pairs.get( propertyName ); if ( pair == null ) { - pairs.put( propertyName, pair = new ArrayList() ); + pairs.put( propertyName, pair = new ArrayList() ); } pair.add( m ); } if ( isSet && ( parameterCount == 2 ) && ( m.getReturnType() == Void.TYPE ) ) { - List pair = (List) pairs.get( propertyName ); + List pair = pairs.get( propertyName ); if ( pair == null ) { - pairs.put( propertyName, pair = new ArrayList() ); + pairs.put( propertyName, pair = new ArrayList() ); } pair.add( m ); } @@ -2153,14 +2153,14 @@ public class OgnlRuntime } } - for ( Iterator it = pairs.keySet().iterator(); it.hasNext(); ) + for ( Iterator it = pairs.keySet().iterator(); it.hasNext(); ) { - String propertyName = (String) it.next(); - List methods = (List) pairs.get( propertyName ); + String propertyName = it.next(); + List methods = pairs.get( propertyName ); if ( methods.size() == 2 ) { - Method method1 = (Method) methods.get( 0 ), method2 = (Method) methods.get( 1 ), setMethod = + Method method1 = methods.get( 0 ), method2 = methods.get( 1 ), setMethod = ( method1.getParameterTypes().length == 2 ) ? method1 : method2, getMethod = ( setMethod == method1 ) ? method2 : method1; Class keyType = getMethod.getParameterTypes()[0], propertyType = getMethod.getReturnType();