LOG.trace("Notification listener registered for stream: {}", stream);
- final GenericNotificationListenerReg genericNotificationListenerReg =
- new GenericNotificationListenerReg(listener) {
+ final GenericNotificationListenerReg reg = new GenericNotificationListenerReg(listener) {
@Override
public void close() {
synchronized (NetconfNotificationManager.this) {
}
};
- notificationListeners.put(BASE_STREAM_NAME, genericNotificationListenerReg);
- return genericNotificationListenerReg;
+ notificationListeners.put(BASE_STREAM_NAME, reg);
+ return reg;
}
@Override
availableStreams.add(streamName);
- final GenericNotificationPublisherReg genericNotificationPublisherReg =
- new GenericNotificationPublisherReg(this, streamName) {
+ final GenericNotificationPublisherReg reg = new GenericNotificationPublisherReg(this, streamName) {
@Override
public void close() {
synchronized (NetconfNotificationManager.this) {
}
};
- notificationPublishers.add(genericNotificationPublisherReg);
+ notificationPublishers.add(reg);
notifyStreamAdded(stream);
- return genericNotificationPublisherReg;
+ return reg;
}
@SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
}
@Override
- public void onYangLibraryUpdate(YangLibraryUpdate yangLibraryUpdate) {
+ public void onYangLibraryUpdate(final YangLibraryUpdate yangLibraryUpdate) {
baseRegistration.onNotification(BASE_STREAM_NAME,
transformUtil.transform(yangLibraryUpdate, YANG_LIBRARY_UPDATE_PATH));
}
final DataTreeIdentifier<DataObject> testId =
DataTreeIdentifier.create(LogicalDatastoreType.OPERATIONAL, instanceIdentifier);
- final OperationalDatastoreListener<DataObject> op =
- new OperationalDatastoreListener<DataObject>(instanceIdentifier) {
+ final var op = new OperationalDatastoreListener<>(instanceIdentifier) {
@Override
public void onDataTreeChanged(final Collection<DataTreeModification<DataObject>> collection) {
+ // no-op
}
};
doReturn(null).when(dataBroker).registerDataTreeChangeListener(any(), any());
LOG.info("{}: Concurrent rpc limit is smaller than 1, no limit will be enforced.", remoteDeviceId);
}
- NetconfDeviceCommunicator netconfDeviceCommunicator =
- userCapabilities.isPresent() ? new NetconfDeviceCommunicator(remoteDeviceId, device,
- new UserPreferences(userCapabilities.get(),
- node.getYangModuleCapabilities() == null ? false : node.getYangModuleCapabilities().isOverride(),
- node.getNonModuleCapabilities() == null ? false : node.getNonModuleCapabilities().isOverride()),
- rpcMessageLimit)
+ NetconfDeviceCommunicator netconfDeviceCommunicator = userCapabilities.isPresent()
+ ? new NetconfDeviceCommunicator(remoteDeviceId, device, new UserPreferences(userCapabilities.get(),
+ node.getYangModuleCapabilities() == null ? false : node.getYangModuleCapabilities().isOverride(),
+ node.getNonModuleCapabilities() == null ? false : node.getNonModuleCapabilities().isOverride()),
+ rpcMessageLimit)
: new NetconfDeviceCommunicator(remoteDeviceId, device, rpcMessageLimit);
if (salFacade instanceof KeepaliveSalFacade) {