You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/01/13 20:43:20 UTC

svn commit: r1231270 - in /cxf/branches/2.5.x-fixes: ./ services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java

Author: dkulp
Date: Fri Jan 13 19:43:19 2012
New Revision: 1231270

URL: http://svn.apache.org/viewvc?rev=1231270&view=rev
Log:
Merged revisions 1230222 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1230222 | dkulp | 2012-01-11 15:08:14 -0500 (Wed, 11 Jan 2012) | 1 line
  
  Fix some compiler warnings
........

Modified:
    cxf/branches/2.5.x-fixes/   (props changed)
    cxf/branches/2.5.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jan 13 19:43:19 2012
@@ -1 +1 @@
-/cxf/trunk:1-1227739,1227823,1228209,1228228,1228230-1228231,1228268,1228277,1228359,1228770,1228850,1229348,1229476,1229663,1229965,1230218,1230800
+/cxf/trunk:1-1227739,1227823,1228209,1228228,1228230-1228231,1228268,1228277,1228359,1228770,1228850,1229348,1229476,1229663,1229965,1230218,1230222,1230800

Modified: cxf/branches/2.5.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java?rev=1231270&r1=1231269&r2=1231270&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/LdapClaimsHandler.java Fri Jan 13 19:43:19 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();