@ -100,66 +100,66 @@ public class SpringSecurityLdapTemplateITests extends AbstractLdapIntegrationTes
@@ -100,66 +100,66 @@ public class SpringSecurityLdapTemplateITests extends AbstractLdapIntegrationTes
@ -52,18 +49,18 @@ public class NestedLdapAuthoritiesPopulatorTests extends AbstractLdapIntegration
@@ -52,18 +49,18 @@ public class NestedLdapAuthoritiesPopulatorTests extends AbstractLdapIntegration
@ -71,7 +68,7 @@ public class NestedLdapAuthoritiesPopulatorTests extends AbstractLdapIntegration
@@ -71,7 +68,7 @@ public class NestedLdapAuthoritiesPopulatorTests extends AbstractLdapIntegration
@ -80,7 +77,7 @@ public class NestedLdapAuthoritiesPopulatorTests extends AbstractLdapIntegration
@@ -80,7 +77,7 @@ public class NestedLdapAuthoritiesPopulatorTests extends AbstractLdapIntegration
@ -88,9 +85,9 @@ public class NestedLdapAuthoritiesPopulatorTests extends AbstractLdapIntegration
@@ -88,9 +85,9 @@ public class NestedLdapAuthoritiesPopulatorTests extends AbstractLdapIntegration
@ -98,9 +95,9 @@ public class NestedLdapAuthoritiesPopulatorTests extends AbstractLdapIntegration
@@ -98,9 +95,9 @@ public class NestedLdapAuthoritiesPopulatorTests extends AbstractLdapIntegration
@ -108,20 +105,20 @@ public class NestedLdapAuthoritiesPopulatorTests extends AbstractLdapIntegration
@@ -108,20 +105,20 @@ public class NestedLdapAuthoritiesPopulatorTests extends AbstractLdapIntegration
@ -152,12 +152,12 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@@ -152,12 +152,12 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@ -183,7 +183,7 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@@ -183,7 +183,7 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@ -196,13 +196,13 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@@ -196,13 +196,13 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@ -210,7 +210,7 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@@ -210,7 +210,7 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@ -218,7 +218,7 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@@ -218,7 +218,7 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@ -239,10 +239,11 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@@ -239,10 +239,11 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@ -253,9 +254,9 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
@@ -253,9 +254,9 @@ public class SpringSecurityLdapTemplate extends LdapTemplate {
}
List<String>svalues=newArrayList<String>();
for(Objecto:values){
if(o!=null){
if(o!=null){
if(String.class.isAssignableFrom(o.getClass())){
svalues.add((String)o);
svalues.add((String)o);
}else{
if(logger.isDebugEnabled()){
logger.debug("Attribute:"+attributeName+" contains a non string value of type["+o.getClass()+"]");
@ -127,7 +127,7 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
@@ -127,7 +127,7 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
server=newLdapServer();
server.setDirectoryService(service);
//AbstractLdapIntegrationTests assume IPv4, so we specify the same here
//AbstractLdapIntegrationTests assume IPv4, so we specify the same here
@ -34,21 +34,23 @@ public class LdapAuthority implements GrantedAuthority {
@@ -34,21 +34,23 @@ public class LdapAuthority implements GrantedAuthority {
if(role==null)thrownewNullPointerException("role can not be null");
this.role=role;
this.dn=dn;
this.attributes=attributes;
@ -56,6 +58,7 @@ public class LdapAuthority implements GrantedAuthority {
@@ -56,6 +58,7 @@ public class LdapAuthority implements GrantedAuthority {
/**
*ReturnstheLDAPattributes
*
*@returntheLDAPattributes,mapcanbenull
*/
publicMap<String,String[]>getAttributes(){
@ -64,6 +67,7 @@ public class LdapAuthority implements GrantedAuthority {
@@ -64,6 +67,7 @@ public class LdapAuthority implements GrantedAuthority {
/**
*ReturnstheDNforthisLDAPauthority
*
*@return
*/
publicStringgetDn(){
@ -72,15 +76,16 @@ public class LdapAuthority implements GrantedAuthority {
@@ -72,15 +76,16 @@ public class LdapAuthority implements GrantedAuthority {
/**
*Returnsthevaluesforaspecificattribute
*
*@paramnametheattributename
*@returnaStringarray,nevernullbutmaybezerolength
*/
publicString[]getAttributeValues(Stringname){
String[]result=null;
if(attributes!=null){
if(attributes!=null){
result=attributes.get(name);
}
if(result==null){
if(result==null){
result=newString[0];
}
returnresult;
@ -88,12 +93,13 @@ public class LdapAuthority implements GrantedAuthority {
@@ -88,12 +93,13 @@ public class LdapAuthority implements GrantedAuthority {
@ -109,8 +115,7 @@ public class LdapAuthority implements GrantedAuthority {
@@ -109,8 +115,7 @@ public class LdapAuthority implements GrantedAuthority {
@ -135,8 +140,8 @@ public class LdapAuthority implements GrantedAuthority {
@@ -135,8 +140,8 @@ public class LdapAuthority implements GrantedAuthority {
@ -128,9 +127,9 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@@ -128,9 +127,9 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@ -157,50 +156,51 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@@ -157,50 +156,51 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@ -208,9 +208,9 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@@ -208,9 +208,9 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
role=getRolePrefix()+role;
//if the group already exist, we will not search for it's parents again.
//this prevents a forever loop for a misconfigured ldap directory
@ -219,8 +219,9 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@@ -219,8 +219,9 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@ -229,6 +230,7 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@@ -229,6 +230,7 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@ -236,8 +238,8 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@@ -236,8 +238,8 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@ -245,8 +247,8 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@@ -245,8 +247,8 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@ -254,5 +256,4 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
@@ -254,5 +256,4 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula