From 3768ca5ec255ef9b8b19359c694be3dc6c9f7a6b Mon Sep 17 00:00:00 2001 From: Tony Tkacik Date: Wed, 8 Apr 2015 19:42:29 +0200 Subject: [PATCH] Fixed incorrect signature in NotificationListenerInvoker Change-Id: I01e54f6193e54b1488a506ae47d24ba8c808281a Signed-off-by: Tony Tkacik --- .../util/NotificationListenerInvoker.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/util/NotificationListenerInvoker.java b/yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/util/NotificationListenerInvoker.java index dce403e1d0..3476d34027 100644 --- a/yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/util/NotificationListenerInvoker.java +++ b/yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/util/NotificationListenerInvoker.java @@ -85,11 +85,11 @@ public final class NotificationListenerInvoker { public void invokeNotification(@Nonnull final NotificationListener impl, @Nonnull final QName rpcName, @Nullable final DataContainer input) { Preconditions.checkNotNull(impl, "implemetation must be supplied"); - MethodHandle invoker = methodInvokers.get(rpcName); + final MethodHandle invoker = methodInvokers.get(rpcName); Preconditions.checkArgument(invoker != null, "Supplied notification is not valid for implementation %s", impl); try { invoker.invokeExact(impl, input); - } catch (Throwable e) { + } catch (final Throwable e) { throw Throwables.propagate(e); } } @@ -99,18 +99,18 @@ public final class NotificationListenerInvoker { } private static Map createInvokerMap(final Class key) { - Builder ret = ImmutableMap.builder(); - for (Method method : key.getMethods()) { + final Builder ret = ImmutableMap.builder(); + for (final Method method : key.getMethods()) { if (BindingReflections.isNotificationCallback(method)) { - Class notification = method.getParameterTypes()[0]; - QName name = BindingReflections.findQName(notification); + final Class notification = method.getParameterTypes()[0]; + final QName name = BindingReflections.findQName(notification); MethodHandle handle; try { handle = LOOKUP.unreflect(method).asType( - MethodType.methodType(Void.class, NotificationListener.class, DataContainer.class)); + MethodType.methodType(void.class, NotificationListener.class, DataContainer.class)); ret.put(name, handle); - } catch (IllegalAccessException e) { + } catch (final IllegalAccessException e) { throw new IllegalStateException("Can not access public method.", e); } } -- 2.36.6