Skip to content

Commit ac458be

Browse files
committed
Polish exception message
1 parent effe606 commit ac458be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-test/src/main/java/org/springframework/test/context/bean/override/convention/TestBeanBeanOverrideHandler.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ protected Object createOverrideInstance(String beanName, @Nullable BeanDefinitio
5858
return this.factoryMethod.invoke(null);
5959
}
6060
catch (IllegalAccessException | InvocationTargetException ex) {
61-
throw new IllegalStateException("Failed to invoke bean overriding method " + this.factoryMethod.getName() +
62-
"; a static method with no formal parameters is expected", ex);
61+
throw new IllegalStateException(
62+
"Failed to invoke @TestBean factory method: " + this.factoryMethod, ex);
6363
}
6464
}
6565

0 commit comments

Comments
 (0)