From a2f7b7e4f15b3d29b333bf54c1e3a64f9db2ac0b Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Mon, 1 Dec 2008 14:29:58 +0000 Subject: [PATCH] Added optional args argument to constructor. --- .../org/springframework/security/MockJoinPoint.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/src/test/java/org/springframework/security/MockJoinPoint.java b/core/src/test/java/org/springframework/security/MockJoinPoint.java index 2b587ee171..3cb779dc1d 100644 --- a/core/src/test/java/org/springframework/security/MockJoinPoint.java +++ b/core/src/test/java/org/springframework/security/MockJoinPoint.java @@ -34,20 +34,22 @@ public class MockJoinPoint implements JoinPoint { private Method beingInvoked; private Object object; - private Class declaringType; + private Class declaringType; + private Object[] args; //~ Constructors =================================================================================================== - public MockJoinPoint(Object object, Method beingInvoked) { + public MockJoinPoint(Object object, Method beingInvoked, Object... args) { this.object = object; this.beingInvoked = beingInvoked; this.declaringType = object.getClass(); + this.args = args; } //~ Methods ======================================================================================================== public Object[] getArgs() { - throw new UnsupportedOperationException("mock not implemented"); + return args; } public String getKind() { @@ -133,7 +135,7 @@ public class MockJoinPoint implements JoinPoint { private class MockStaticPart implements StaticPart { private Method beingInvoked; private Class declaringType; - + public MockStaticPart(Method beingInvoked, Class declaringType) { this.beingInvoked = beingInvoked; this.declaringType = declaringType;