Fix usage of Java8 API

master
Stephane Nicoll 10 years ago
parent 4741a12fdc
commit 37c04bd9c8
  1. 4
      spring-context/src/main/java/org/springframework/context/event/ApplicationListenerMethodAdapter.java

@ -288,8 +288,8 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe
private ResolvableType resolveDeclaredEventType() { private ResolvableType resolveDeclaredEventType() {
Parameter[] parameters = this.method.getParameters(); int count = this.method.getParameterTypes().length;
if (parameters.length != 1) { if (count != 1) {
throw new IllegalStateException("Only one parameter is allowed " + throw new IllegalStateException("Only one parameter is allowed " +
"for event listener method: " + method); "for event listener method: " + method);
} }

Loading…
Cancel
Save