From d88adf3f9e8d6f48bd785531cd34226835becb5b Mon Sep 17 00:00:00 2001 From: Ray Krueger Date: Wed, 6 Sep 2006 03:02:29 +0000 Subject: [PATCH] Fixed Java 1.3 incompatible IllegalStateException constructor. Also fixed a potential NPE in getAccessibleField --- .../org/acegisecurity/acls/jdbc/BasicLookupStrategy.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sandbox/src/main/java/org/acegisecurity/acls/jdbc/BasicLookupStrategy.java b/sandbox/src/main/java/org/acegisecurity/acls/jdbc/BasicLookupStrategy.java index 9196e57eec..b132dddbee 100644 --- a/sandbox/src/main/java/org/acegisecurity/acls/jdbc/BasicLookupStrategy.java +++ b/sandbox/src/main/java/org/acegisecurity/acls/jdbc/BasicLookupStrategy.java @@ -240,7 +240,8 @@ public final class BasicLookupStrategy implements LookupStrategy { try { aces = (List) acesField.get(acl); } catch (IllegalAccessException ex) { - throw new IllegalStateException("Could not obtain AclImpl.ace field", ex); + throw new IllegalStateException("Could not obtain AclImpl.ace field: cause[" + ex.getMessage() + "]"); + } // Add the ACE if it doesn't already exist in the ACL.aces field @@ -259,7 +260,7 @@ public final class BasicLookupStrategy implements LookupStrategy { if (field == null) { // Unable to locate, so try the superclass (if there is one) if (clazz.getSuperclass() != null) { - getAccessibleField(clazz.getSuperclass(), protectedField); + field = getAccessibleField(clazz.getSuperclass(), protectedField); } else { throw new IllegalArgumentException("Couldn't find '" + protectedField + "' field"); }