ソースを参照

Fixed jdk 1.4 compatibility issues

Luke Taylor 17 年 前
コミット
3cb504fa95

+ 1 - 1
core/src/main/java/org/springframework/security/config/PasswordEncoderParser.java

@@ -64,7 +64,7 @@ public class PasswordEncoderParser {
         boolean useBase64 = false;
         
         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);

+ 2 - 1
core/src/main/java/org/springframework/security/intercept/method/ProtectPointcutPostProcessor.java

@@ -49,6 +49,7 @@ import org.springframework.util.Assert;
  *
  * @author Ben Alex
  * @verion $Id$
+ * @since 2.0
  *
  */
 public final class ProtectPointcutPostProcessor implements BeanPostProcessor {
@@ -88,7 +89,7 @@ public final class ProtectPointcutPostProcessor implements BeanPostProcessor {
 		try {
 			methods = bean.getClass().getMethods();
 		} 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

+ 1 - 1
core/src/main/java/org/springframework/security/providers/encoding/Md4PasswordEncoder.java

@@ -51,7 +51,7 @@ public class Md4PasswordEncoder extends BaseDigestPasswordEncoder {
 		try {
 			passBytes = saltedPass.getBytes("UTF-8");
 		} catch (UnsupportedEncodingException e) {
-			throw new IllegalStateException("UTF-8 not supported!", e);
+			throw new IllegalStateException("UTF-8 not supported!");
 		}
 		
 		Md4 md4 = new Md4();

+ 2 - 2
core/src/main/java/org/springframework/security/providers/ldap/authenticator/LdapShaPasswordEncoder.java

@@ -85,9 +85,9 @@ public class LdapShaPasswordEncoder implements PasswordEncoder {
             sha = MessageDigest.getInstance("SHA");
             sha.update(rawPass.getBytes("UTF-8"));
         } catch (java.security.NoSuchAlgorithmException e) {
-            throw new IllegalStateException("No SHA implementation available!", e);
+            throw new IllegalStateException("No SHA implementation available!");
 		} catch (UnsupportedEncodingException ue) {
-			throw new IllegalStateException("UTF-8 not supported!", ue);
+			throw new IllegalStateException("UTF-8 not supported!");
 		}
 
         if (salt != null) {