Skip to content

Commit

Permalink
Fix compile for sec 4.x
Browse files Browse the repository at this point in the history
- Fixes spring-projects#33
- In websecurityconfig, use default xsd. With 4.x sec core's
  namespace handler barks if 3.x is in use.
- Doing tweaks in KerberosLdapContextSource to overcome trouble
  with ldap's AbstractContextSource which wrongly removed
  throwing exception from its overridded afterPropertiesSet()
  method. Remove throw and re-throw super call.
  • Loading branch information
jvalkeal committed Jul 22, 2015
1 parent fb456d6 commit 85d8d3e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,16 @@ public KerberosLdapContextSource(List<String> urls, String baseDn) {
}

@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");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance"
xmlns:sec="http:https://www.springframework.org/schema/security"
xmlns:context="http:https://www.springframework.org/schema/context"
xsi:schemaLocation="http:https://www.springframework.org/schema/security http:https://www.springframework.org/schema/security/spring-security-3.2.xsd
xsi:schemaLocation="http:https://www.springframework.org/schema/security http:https://www.springframework.org/schema/security/spring-security.xsd
http:https://www.springframework.org/schema/beans http:https://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http:https://www.springframework.org/schema/context http:https://www.springframework.org/schema/context/spring-context-4.1.xsd">

Expand Down

0 comments on commit 85d8d3e

Please sign in to comment.