Merge pull request #40 from jvalkeal/gh33

Fix Compatibility with Spring Security 4.x
This commit is contained in:
Rob Winch
2015-07-23 12:21:39 -05:00
2 changed files with 11 additions and 3 deletions

View File

@@ -87,8 +87,16 @@ public class KerberosLdapContextSource extends DefaultSpringSecurityContextSourc
}
@Override
public void afterPropertiesSet() throws Exception {
super.afterPropertiesSet();
public void afterPropertiesSet() /*throws Exception*/ {
// org.springframework.ldap.core.support.AbstractContextSource in 4.x
// doesn't throw Exception for its InitializingBean method, so
// we had to remove it from here also. Addition to that
// we need to catch super call and re-throw.
try {
super.afterPropertiesSet();
} catch (Exception e) {
throw new RuntimeException(e);
}
Assert.notNull(this.loginConfig, "loginConfig must be specified");
}

View File

@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sec="http://www.springframework.org/schema/security"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd
xsi:schemaLocation="http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd">