diff options
-rw-r--r-- | server/src/main/java/com/vaadin/event/EventRouter.java | 3 | ||||
-rw-r--r-- | server/src/main/java/com/vaadin/event/ListenerMethod.java | 8 |
2 files changed, 4 insertions, 7 deletions
diff --git a/server/src/main/java/com/vaadin/event/EventRouter.java b/server/src/main/java/com/vaadin/event/EventRouter.java index 59599a0aac..a6bb030cf8 100644 --- a/server/src/main/java/com/vaadin/event/EventRouter.java +++ b/server/src/main/java/com/vaadin/event/EventRouter.java @@ -135,6 +135,7 @@ public class EventRouter implements MethodEventSource { for (Method m : methods) { if (m.getName().equals(methodName)) { method = m; + break; } } if (method == null) { @@ -152,7 +153,6 @@ public class EventRouter implements MethodEventSource { } } } - } /** @@ -209,7 +209,6 @@ public class EventRouter implements MethodEventSource { listenerMethod.receiveEvent(event); } } - } } diff --git a/server/src/main/java/com/vaadin/event/ListenerMethod.java b/server/src/main/java/com/vaadin/event/ListenerMethod.java index 9159f7f781..8391303c89 100644 --- a/server/src/main/java/com/vaadin/event/ListenerMethod.java +++ b/server/src/main/java/com/vaadin/event/ListenerMethod.java @@ -243,10 +243,10 @@ public class ListenerMethod implements EventListener, Serializable { throws IllegalArgumentException { // Finds the correct method - Method method = null; for (Method m : target.getClass().getMethods()) { if (m.getName().equals(methodName)) { method = m; + break; } } if (method == null) { @@ -271,7 +271,6 @@ public class ListenerMethod implements EventListener, Serializable { this.eventType = eventType; this.target = target; - this.method = method; this.arguments = arguments; this.eventArgumentIndex = eventArgumentIndex; } @@ -355,6 +354,7 @@ public class ListenerMethod implements EventListener, Serializable { for (Method m : target.getClass().getMethods()) { if (m.getName().equals(methodName)) { method = m; + break; } } if (method == null) { @@ -364,7 +364,6 @@ public class ListenerMethod implements EventListener, Serializable { this.eventType = eventType; this.target = target; - this.method = method; this.arguments = arguments; eventArgumentIndex = -1; } @@ -451,10 +450,10 @@ public class ListenerMethod implements EventListener, Serializable { throws IllegalArgumentException { // Finds the correct method - Method method = null; for (Method m : target.getClass().getMethods()) { if (m.getName().equals(methodName)) { method = m; + break; } } if (method == null) { @@ -464,7 +463,6 @@ public class ListenerMethod implements EventListener, Serializable { this.eventType = eventType; this.target = target; - this.method = method; eventArgumentIndex = -1; final Class<?>[] params = method.getParameterTypes(); |