Added warning suppression for deprecation.

This commit is contained in:
Luke Taylor 2008-12-17 00:31:17 +00:00
parent e86c76f555
commit d8b5f770e9
1 changed files with 4 additions and 14 deletions

View File

@ -23,24 +23,14 @@ import org.springframework.security.TargetObject;
import org.springframework.security.intercept.method.MapBasedMethodDefinitionSource; import org.springframework.security.intercept.method.MapBasedMethodDefinitionSource;
import org.springframework.security.intercept.method.MethodDefinitionSourceEditor; import org.springframework.security.intercept.method.MethodDefinitionSourceEditor;
/** /**
* Tests {@link MethodDefinitionSourceAdvisor}. * Tests {@link MethodDefinitionSourceAdvisor}.
* *
* @author Ben Alex * @author Ben Alex
* @version $Id$ * @version $Id$
*/ */
@SuppressWarnings("deprecation")
public class MethodDefinitionSourceAdvisorTests extends TestCase { public class MethodDefinitionSourceAdvisorTests extends TestCase {
//~ Constructors ===================================================================================================
public MethodDefinitionSourceAdvisorTests() {
super();
}
public MethodDefinitionSourceAdvisorTests(String arg0) {
super(arg0);
}
//~ Methods ======================================================================================================== //~ Methods ========================================================================================================
private MethodSecurityInterceptor getInterceptor() { private MethodSecurityInterceptor getInterceptor() {
@ -65,7 +55,7 @@ public class MethodDefinitionSourceAdvisorTests extends TestCase {
public void testAdvisorReturnsFalseWhenMethodInvocationNotDefined() public void testAdvisorReturnsFalseWhenMethodInvocationNotDefined()
throws Exception { throws Exception {
Class clazz = TargetObject.class; Class<TargetObject> clazz = TargetObject.class;
Method method = clazz.getMethod("makeLowerCase", new Class[] {String.class}); Method method = clazz.getMethod("makeLowerCase", new Class[] {String.class});
MethodDefinitionSourceAdvisor advisor = new MethodDefinitionSourceAdvisor(getInterceptor()); MethodDefinitionSourceAdvisor advisor = new MethodDefinitionSourceAdvisor(getInterceptor());
@ -74,7 +64,7 @@ public class MethodDefinitionSourceAdvisorTests extends TestCase {
public void testAdvisorReturnsTrueWhenMethodInvocationIsDefined() public void testAdvisorReturnsTrueWhenMethodInvocationIsDefined()
throws Exception { throws Exception {
Class clazz = TargetObject.class; Class<TargetObject> clazz = TargetObject.class;
Method method = clazz.getMethod("countLength", new Class[] {String.class}); Method method = clazz.getMethod("countLength", new Class[] {String.class});
MethodDefinitionSourceAdvisor advisor = new MethodDefinitionSourceAdvisor(getInterceptor()); MethodDefinitionSourceAdvisor advisor = new MethodDefinitionSourceAdvisor(getInterceptor());
@ -93,7 +83,7 @@ public class MethodDefinitionSourceAdvisorTests extends TestCase {
} }
public void testUnsupportedOperations() throws Throwable { public void testUnsupportedOperations() throws Throwable {
Class clazz = TargetObject.class; Class<TargetObject> clazz = TargetObject.class;
Method method = clazz.getMethod("countLength", new Class[] {String.class}); Method method = clazz.getMethod("countLength", new Class[] {String.class});
MethodDefinitionSourceAdvisor.InternalMethodInvocation imi = new MethodDefinitionSourceAdvisor(getInterceptor()).new InternalMethodInvocation(method, clazz); MethodDefinitionSourceAdvisor.InternalMethodInvocation imi = new MethodDefinitionSourceAdvisor(getInterceptor()).new InternalMethodInvocation(method, clazz);