cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1230222 - /cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java
Date Wed, 11 Jan 2012 20:08:14 GMT
Author: dkulp
Date: Wed Jan 11 20:08:14 2012
New Revision: 1230222

URL: http://svn.apache.org/viewvc?rev=1230222&view=rev
Log:
Fix some compiler warnings

Modified:
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java?rev=1230222&r1=1230221&r2=1230222&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java
Wed Jan 11 20:08:14 2012
@@ -40,6 +40,7 @@ import javax.security.auth.x500.X500Prin
 import javax.xml.ws.WebServiceContext;
 
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.ws.security.sts.provider.STSException;
 import org.springframework.ldap.core.AttributesMapper;
 import org.springframework.ldap.core.LdapTemplate;
@@ -191,13 +192,12 @@ public class LdapClaimsHandler implement
             };
         
         
-        @SuppressWarnings("unchecked")
-        List result = ldap.search((this.userBaseDn == null) ? "" : this.userBaseDn, filter.toString(),
+        List<?> result = ldap.search((this.userBaseDn == null) ? "" : this.userBaseDn,
filter.toString(),
                 SearchControls.SUBTREE_SCOPE, searchAttributes, mapper);
       
         Map<String, Attribute> ldapAttributes = null;
         if (result != null && result.size() > 0) {
-            ldapAttributes = (Map<String, Attribute>)result.get(0);
+            ldapAttributes = CastUtils.cast((Map<?, ?>)result.get(0));
         }
         
         ClaimCollection claimsColl = new ClaimCollection();



Mime
View raw message