diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java index ea14f4c875..cac02472ca 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java @@ -314,14 +314,14 @@ public class CallbacksSecurityTests { } final CustomCallbackBean bean = new CustomCallbackBean(); - final Method method = bean.getClass().getMethod("destroy", null); + final Method method = bean.getClass().getMethod("destroy"); method.setAccessible(true); try { AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws Exception { - method.invoke(bean, null); + method.invoke(bean); return null; } }, acc); diff --git a/spring-context/src/main/java/org/springframework/validation/ValidationUtils.java b/spring-context/src/main/java/org/springframework/validation/ValidationUtils.java index 07d14c681f..0e5004e5bd 100644 --- a/spring-context/src/main/java/org/springframework/validation/ValidationUtils.java +++ b/spring-context/src/main/java/org/springframework/validation/ValidationUtils.java @@ -52,7 +52,7 @@ public abstract class ValidationUtils { * the validation of the supplied object's type */ public static void invokeValidator(Validator validator, Object obj, Errors errors) { - invokeValidator(validator, obj, errors, (Class[]) null); + invokeValidator(validator, obj, errors, (Object[]) null); } /** diff --git a/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerTests.java b/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerTests.java index 3363f4f585..2370488f80 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerTests.java @@ -72,7 +72,7 @@ public class MethodExclusionMBeanInfoAssemblerTests extends AbstractJmxAssembler Properties ignored = new Properties(); ignored.setProperty(beanKey, "dontExposeMe,setSuperman"); assembler.setIgnoredMethodMappings(ignored); - Method method = JmxTestBean.class.getMethod("dontExposeMe", null); + Method method = JmxTestBean.class.getMethod("dontExposeMe"); assertFalse(assembler.isNotIgnored(method, beanKey)); // this bean does not have any ignored methods on it, so must obviously not be ignored... assertTrue(assembler.isNotIgnored(method, "someOtherBeanKey")); diff --git a/spring-core/src/test/java/org/springframework/core/LocalVariableTableParameterNameDiscovererTests.java b/spring-core/src/test/java/org/springframework/core/LocalVariableTableParameterNameDiscovererTests.java index b346e6176b..da27d69e71 100644 --- a/spring-core/src/test/java/org/springframework/core/LocalVariableTableParameterNameDiscovererTests.java +++ b/spring-core/src/test/java/org/springframework/core/LocalVariableTableParameterNameDiscovererTests.java @@ -185,7 +185,7 @@ public class LocalVariableTableParameterNameDiscovererTests extends TestCase { assertEquals("x", names[1]); assertEquals("i", names[2]); - m = clazz.getMethod("getDate", null); + m = clazz.getMethod("getDate"); names = discoverer.getParameterNames(m); assertEquals(0, names.length); @@ -202,7 +202,7 @@ public class LocalVariableTableParameterNameDiscovererTests extends TestCase { Class clazz = Component.class; String methodName = "list"; - Method m = clazz.getMethod(methodName, null); + Method m = clazz.getMethod(methodName); String[] names = discoverer.getParameterNames(m); assertNull(names); diff --git a/spring-core/src/test/java/org/springframework/core/style/ToStringCreatorTests.java b/spring-core/src/test/java/org/springframework/core/style/ToStringCreatorTests.java index 928486b396..f8db4e7fd9 100644 --- a/spring-core/src/test/java/org/springframework/core/style/ToStringCreatorTests.java +++ b/spring-core/src/test/java/org/springframework/core/style/ToStringCreatorTests.java @@ -111,7 +111,7 @@ public class ToStringCreatorTests extends TestCase { } public void testMethod() throws Exception { - String str = new ToStringCreator(this).append("myMethod", this.getClass().getMethod("testMethod", null)) + String str = new ToStringCreator(this).append("myMethod", this.getClass().getMethod("testMethod")) .toString(); assertEquals("[ToStringCreatorTests@" + ObjectUtils.getIdentityHexString(this) + " myMethod = testMethod@ToStringCreatorTests]", str); diff --git a/spring-core/src/test/java/org/springframework/util/ClassUtilsTests.java b/spring-core/src/test/java/org/springframework/util/ClassUtilsTests.java index 64a24084ba..8b7fdff79a 100644 --- a/spring-core/src/test/java/org/springframework/util/ClassUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/util/ClassUtilsTests.java @@ -171,14 +171,14 @@ public class ClassUtilsTests extends TestCase { } public void testHasMethod() throws Exception { - assertTrue(ClassUtils.hasMethod(Collection.class, "size", null)); - assertTrue(ClassUtils.hasMethod(Collection.class, "remove", new Class[] {Object.class})); - assertFalse(ClassUtils.hasMethod(Collection.class, "remove", null)); - assertFalse(ClassUtils.hasMethod(Collection.class, "someOtherMethod", null)); + assertTrue(ClassUtils.hasMethod(Collection.class, "size")); + assertTrue(ClassUtils.hasMethod(Collection.class, "remove", Object.class)); + assertFalse(ClassUtils.hasMethod(Collection.class, "remove")); + assertFalse(ClassUtils.hasMethod(Collection.class, "someOtherMethod")); } public void testGetMethodIfAvailable() throws Exception { - Method method = ClassUtils.getMethodIfAvailable(Collection.class, "size", null); + Method method = ClassUtils.getMethodIfAvailable(Collection.class, "size"); assertNotNull(method); assertEquals("size", method.getName()); @@ -186,8 +186,8 @@ public class ClassUtilsTests extends TestCase { assertNotNull(method); assertEquals("remove", method.getName()); - assertNull(ClassUtils.getMethodIfAvailable(Collection.class, "remove", null)); - assertNull(ClassUtils.getMethodIfAvailable(Collection.class, "someOtherMethod", null)); + assertNull(ClassUtils.getMethodIfAvailable(Collection.class, "remove")); + assertNull(ClassUtils.getMethodIfAvailable(Collection.class, "someOtherMethod")); } public void testGetMethodCountForName() {