X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fcompat%2FNotificationInvoker.java;h=cdc6315e4930c7433f11e3fe8de3e3c7efea100a;hb=dea515c8870769408b9bea29f555d6b71ff43211;hp=08a147721f71ccad7569a7e61fce07cdc0bad17e;hpb=d8acce7ba659501f61371eb07a86f391adde87d1;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/NotificationInvoker.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/NotificationInvoker.java index 08a147721f..cdc6315e49 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/NotificationInvoker.java +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/NotificationInvoker.java @@ -8,6 +8,7 @@ package org.opendaylight.controller.md.sal.binding.compat; import com.google.common.collect.ImmutableMap; +import com.google.common.reflect.TypeToken; import java.lang.reflect.Method; import java.util.HashMap; import java.util.HashSet; @@ -28,7 +29,8 @@ final class NotificationInvoker implements org.opendaylight.controller.sal.bindi private NotificationInvoker(final NotificationListener listener) { delegate = listener; final Map, InvokerContext> builder = new HashMap<>(); - for(final Class iface : listener.getClass().getInterfaces()) { + for(final TypeToken ifaceToken : TypeToken.of(listener.getClass()).getTypes().interfaces()) { + Class iface = ifaceToken.getRawType(); if(NotificationListener.class.isAssignableFrom(iface) && BindingReflections.isBindingClass(iface)) { @SuppressWarnings("unchecked") final Class listenerType = (Class) iface;