Change-Id: Ia13a6447f78eca0d888ed6801b8b47d17a35788c
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
*/
package org.opendaylight.genius.datastoreutils.listeners;
+import javax.annotation.PreDestroy;
import javax.inject.Inject;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener;
}
@Override
- public void close() {
+ @PreDestroy
+ public final void close() {
+ // ^^^ final to avoid @Override without @PreDestroy
+ // JSR 250: "the method is called unless a subclass overrides the method without repeating the annotation"
dataChangeListenerRegistration.close();
}
}