mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-06 18:52:13 +00:00
Make compatible with interface changes to aopalliance.jar.
This commit is contained in:
parent
e3dc29ae96
commit
14f27ae683
@ -67,11 +67,11 @@ public class BankSecurityVoter implements AccessDecisionVoter {
|
|||||||
// Lookup the account number being passed
|
// Lookup the account number being passed
|
||||||
Integer accountNumber = null;
|
Integer accountNumber = null;
|
||||||
|
|
||||||
for (int i = 0; i < invocation.getArgumentCount(); i++) {
|
for (int i = 0; i < invocation.getArguments().length; i++) {
|
||||||
Class argClass = invocation.getArgument(i).getClass();
|
Class argClass = invocation.getArguments()[i].getClass();
|
||||||
|
|
||||||
if (Integer.class.isAssignableFrom(argClass)) {
|
if (Integer.class.isAssignableFrom(argClass)) {
|
||||||
accountNumber = (Integer) invocation.getArgument(i);
|
accountNumber = (Integer) invocation.getArguments()[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
package net.sf.acegisecurity.attribute;
|
package net.sf.acegisecurity.attribute;
|
||||||
|
|
||||||
import org.aopalliance.intercept.AttributeRegistry;
|
|
||||||
import org.aopalliance.intercept.Invocation;
|
import org.aopalliance.intercept.Invocation;
|
||||||
import org.aopalliance.intercept.MethodInvocation;
|
import org.aopalliance.intercept.MethodInvocation;
|
||||||
|
|
||||||
@ -66,13 +65,6 @@ public class MockMethodInvocation implements MethodInvocation {
|
|||||||
throw new UnsupportedOperationException("mock method not implemented");
|
throw new UnsupportedOperationException("mock method not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.aopalliance.intercept.Invocation#getAttributeRegistry()
|
|
||||||
*/
|
|
||||||
public AttributeRegistry getAttributeRegistry() {
|
|
||||||
throw new UnsupportedOperationException("mock method not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.aopalliance.intercept.MethodInvocation#getMethod()
|
* @see org.aopalliance.intercept.MethodInvocation#getMethod()
|
||||||
*/
|
*/
|
||||||
|
@ -69,13 +69,13 @@ public class ContactSecurityVoter implements AccessDecisionVoter {
|
|||||||
// Lookup the account number being passed
|
// Lookup the account number being passed
|
||||||
String passedOwner = null;
|
String passedOwner = null;
|
||||||
|
|
||||||
for (int i = 0; i < invocation.getArgumentCount(); i++) {
|
for (int i = 0; i < invocation.getArguments().length; i++) {
|
||||||
Class argClass = invocation.getArgument(i).getClass();
|
Class argClass = invocation.getArguments()[i].getClass();
|
||||||
|
|
||||||
if (String.class.isAssignableFrom(argClass)) {
|
if (String.class.isAssignableFrom(argClass)) {
|
||||||
passedOwner = (String) invocation.getArgument(i);
|
passedOwner = (String) invocation.getArguments()[i];
|
||||||
} else if (Contact.class.isAssignableFrom(argClass)) {
|
} else if (Contact.class.isAssignableFrom(argClass)) {
|
||||||
passedOwner = ((Contact) invocation.getArgument(i))
|
passedOwner = ((Contact) invocation.getArguments()[i])
|
||||||
.getOwner();
|
.getOwner();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user