@SuppressWarnings("rawtypes")
private EventBusChangeRecorder eventBusChangeRecorder;
- @SuppressWarnings("rawtypes")
- private ListenerRegistration registration;
+
+ private volatile ListenerRegistration<?> registration;
/**
* Creating {@link EventBus}.
@Override
public final void close() throws Exception {
- this.registration.close();
- this.registration = null;
+ if (this.registration != null) {
+ this.registration.close();
+ this.registration = null;
+ }
deleteDataInDS();
unregister();
* @param registration
* DOMDataChangeListener registration
*/
- @SuppressWarnings("rawtypes")
- public void setRegistration(final ListenerRegistration registration) {
+ public void setRegistration(final ListenerRegistration<?> registration) {
this.registration = registration;
}