Update project workspace settings to Java 1.5. NB: Maven remains at 1.3 compatibility for all subprojects except "domain". It is recommended the Eclipse "Problems" view be customised to not display items containing "Type Safety:" in their description. Developers should NOT introduce 1.5+ dependencies to any projects apart from "domain".
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2004 Acegi Technology Pty Limited
|
||||
/* Copyright 2004, 2005 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -74,12 +74,12 @@ public class NamedEntityObjectIdentity implements AclObjectIdentity {
|
||||
Class clazz = object.getClass();
|
||||
|
||||
try {
|
||||
Method method = clazz.getMethod("getId", null);
|
||||
Object result = method.invoke(object, null);
|
||||
Method method = clazz.getMethod("getId", new Class[] {});
|
||||
Object result = method.invoke(object, new Object[] {});
|
||||
this.id = result.toString();
|
||||
} catch (NoSuchMethodException nsme) {
|
||||
throw new IllegalArgumentException("Object of class '" + clazz
|
||||
+ "' does not provide the required getId() method: " + object);
|
||||
+ "' does not provide the required getId() method: " + object);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2004 Acegi Technology Pty Limited
|
||||
/* Copyright 2004, 2005 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -142,7 +142,7 @@ public class MethodDefinitionAttributes extends AbstractMethodDefinitionSource {
|
||||
|
||||
try {
|
||||
Method m = clazz.getDeclaredMethod(method.getName(),
|
||||
method.getParameterTypes());
|
||||
(Class[]) method.getParameterTypes());
|
||||
addMethodAttributes(definition, m);
|
||||
} catch (Exception e) {
|
||||
// this won't happen since we are getting a method from an interface that
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2004 Acegi Technology Pty Limited
|
||||
/* Copyright 2004, 2005 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -223,7 +223,7 @@ public class MethodDefinitionMap extends AbstractMethodDefinitionSource {
|
||||
try {
|
||||
// Look for the method on the current interface
|
||||
Method interfaceMethod = clazz.getDeclaredMethod(method.getName(),
|
||||
method.getParameterTypes());
|
||||
(Class[]) method.getParameterTypes());
|
||||
ConfigAttributeDefinition interfaceAssigned = (ConfigAttributeDefinition) this.methodMap
|
||||
.get(interfaceMethod);
|
||||
merge(definition, interfaceAssigned);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2004 Acegi Technology Pty Limited
|
||||
/* Copyright 2004, 2005 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,9 +17,9 @@ package net.sf.acegisecurity.providers.dao.event;
|
||||
|
||||
import net.sf.acegisecurity.Authentication;
|
||||
import net.sf.acegisecurity.UserDetails;
|
||||
import net.sf.acegisecurity.providers.dao.User;
|
||||
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2004 Acegi Technology Pty Limited
|
||||
/* Copyright 2004, 2005 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,7 +18,6 @@ package net.sf.acegisecurity.providers.dao.salt;
|
||||
import net.sf.acegisecurity.AuthenticationServiceException;
|
||||
import net.sf.acegisecurity.UserDetails;
|
||||
import net.sf.acegisecurity.providers.dao.SaltSource;
|
||||
import net.sf.acegisecurity.providers.dao.User;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
@@ -64,9 +63,9 @@ public class ReflectionSaltSource implements SaltSource, InitializingBean {
|
||||
public Object getSalt(UserDetails user) {
|
||||
try {
|
||||
Method reflectionMethod = user.getClass().getMethod(this.userPropertyToUse,
|
||||
null);
|
||||
new Class[] {});
|
||||
|
||||
return reflectionMethod.invoke(user, null);
|
||||
return reflectionMethod.invoke(user, new Object[] {});
|
||||
} catch (Exception exception) {
|
||||
throw new AuthenticationServiceException(exception.getMessage());
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2004 Acegi Technology Pty Limited
|
||||
/* Copyright 2004, 2005 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,7 +17,6 @@ package net.sf.acegisecurity.providers.dao.salt;
|
||||
|
||||
import net.sf.acegisecurity.UserDetails;
|
||||
import net.sf.acegisecurity.providers.dao.SaltSource;
|
||||
import net.sf.acegisecurity.providers.dao.User;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
|
||||
package net.sf.acegisecurity;
|
||||
|
||||
import net.sf.acegisecurity.providers.dao.User;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2004 Acegi Technology Pty Limited
|
||||
/* Copyright 2004, 2005 Acegi Technology Pty Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,6 +29,7 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
@@ -195,12 +196,15 @@ public class BasicAclEntryVoter implements AccessDecisionVoter,
|
||||
}
|
||||
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
Assert.notNull(processConfigAttribute, "A processConfigAttribute is mandatory");
|
||||
Assert.notNull(processConfigAttribute,
|
||||
"A processConfigAttribute is mandatory");
|
||||
Assert.notNull(aclManager, "An aclManager is mandatory");
|
||||
Assert.notNull(processDomainObjectClass, "A processDomainObjectClass is mandatory");
|
||||
Assert.notNull(processDomainObjectClass,
|
||||
"A processDomainObjectClass is mandatory");
|
||||
|
||||
if ((requirePermission == null) || (requirePermission.length == 0)) {
|
||||
throw new IllegalArgumentException("One or more requirePermission entries is mandatory");
|
||||
throw new IllegalArgumentException(
|
||||
"One or more requirePermission entries is mandatory");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,8 +252,10 @@ public class BasicAclEntryVoter implements AccessDecisionVoter,
|
||||
if ((internalMethod != null) && !"".equals(internalMethod)) {
|
||||
try {
|
||||
Class clazz = domainObject.getClass();
|
||||
Method method = clazz.getMethod(internalMethod, null);
|
||||
domainObject = method.invoke(domainObject, null);
|
||||
Method method = clazz.getMethod(internalMethod,
|
||||
new Class[] {});
|
||||
domainObject = method.invoke(domainObject,
|
||||
new Object[] {});
|
||||
} catch (NoSuchMethodException nsme) {
|
||||
throw new AuthorizationServiceException(
|
||||
"Object of class '" + domainObject.getClass()
|
||||
|
||||
Reference in New Issue
Block a user