Fixed jdk 1.4 compatibility issues
This commit is contained in:
parent
4d306c2c1e
commit
3cb504fa95
|
@ -64,7 +64,7 @@ public class PasswordEncoderParser {
|
||||||
boolean useBase64 = false;
|
boolean useBase64 = false;
|
||||||
|
|
||||||
if (StringUtils.hasText(element.getAttribute(ATT_BASE_64))) {
|
if (StringUtils.hasText(element.getAttribute(ATT_BASE_64))) {
|
||||||
useBase64 = Boolean.parseBoolean(element.getAttribute(ATT_BASE_64));
|
useBase64 = new Boolean(element.getAttribute(ATT_BASE_64)).booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
String ref = element.getAttribute(ATT_REF);
|
String ref = element.getAttribute(ATT_REF);
|
||||||
|
|
|
@ -49,6 +49,7 @@ import org.springframework.util.Assert;
|
||||||
*
|
*
|
||||||
* @author Ben Alex
|
* @author Ben Alex
|
||||||
* @verion $Id$
|
* @verion $Id$
|
||||||
|
* @since 2.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public final class ProtectPointcutPostProcessor implements BeanPostProcessor {
|
public final class ProtectPointcutPostProcessor implements BeanPostProcessor {
|
||||||
|
@ -88,7 +89,7 @@ public final class ProtectPointcutPostProcessor implements BeanPostProcessor {
|
||||||
try {
|
try {
|
||||||
methods = bean.getClass().getMethods();
|
methods = bean.getClass().getMethods();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new IllegalStateException(e);
|
throw new IllegalStateException(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check to see if any of those methods are compatible with our pointcut expressions
|
// Check to see if any of those methods are compatible with our pointcut expressions
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class Md4PasswordEncoder extends BaseDigestPasswordEncoder {
|
||||||
try {
|
try {
|
||||||
passBytes = saltedPass.getBytes("UTF-8");
|
passBytes = saltedPass.getBytes("UTF-8");
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
throw new IllegalStateException("UTF-8 not supported!", e);
|
throw new IllegalStateException("UTF-8 not supported!");
|
||||||
}
|
}
|
||||||
|
|
||||||
Md4 md4 = new Md4();
|
Md4 md4 = new Md4();
|
||||||
|
|
|
@ -85,9 +85,9 @@ public class LdapShaPasswordEncoder implements PasswordEncoder {
|
||||||
sha = MessageDigest.getInstance("SHA");
|
sha = MessageDigest.getInstance("SHA");
|
||||||
sha.update(rawPass.getBytes("UTF-8"));
|
sha.update(rawPass.getBytes("UTF-8"));
|
||||||
} catch (java.security.NoSuchAlgorithmException e) {
|
} catch (java.security.NoSuchAlgorithmException e) {
|
||||||
throw new IllegalStateException("No SHA implementation available!", e);
|
throw new IllegalStateException("No SHA implementation available!");
|
||||||
} catch (UnsupportedEncodingException ue) {
|
} catch (UnsupportedEncodingException ue) {
|
||||||
throw new IllegalStateException("UTF-8 not supported!", ue);
|
throw new IllegalStateException("UTF-8 not supported!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (salt != null) {
|
if (salt != null) {
|
||||||
|
|
Loading…
Reference in New Issue