Fixed jdk 1.4 compatibility issues

This commit is contained in:
Luke Taylor 2008-04-01 14:32:31 +00:00
parent 4d306c2c1e
commit 3cb504fa95
4 changed files with 6 additions and 5 deletions

View File

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

View File

@ -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

View File

@ -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();

View File

@ -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) {