@SuppressWarnings({ "rawtypes", "unchecked" })
final BindingDOMDataTreeChangeListenerAdapter<T> domListener =
listener instanceof ClusteredDataTreeChangeListener ?
- new BindingClusteredDOMDataTreeChangeListenerAdapter<T>(
- codec, (ClusteredDataTreeChangeListener)listener, treeId.getDatastoreType()) :
- new BindingDOMDataTreeChangeListenerAdapter<T>(codec, listener, treeId.getDatastoreType());
+ new BindingClusteredDOMDataTreeChangeListenerAdapter<>(
+ codec, (ClusteredDataTreeChangeListener) listener, treeId.getDatastoreType()) :
+ new BindingDOMDataTreeChangeListenerAdapter<>(codec, listener, treeId.getDatastoreType());
final ListenerRegistration<BindingDOMDataTreeChangeListenerAdapter<T>> domReg =
dataTreeChangeService.registerDataTreeChangeListener(domIdentifier, domListener);
@Override
public <T extends MountPointListener> ListenerRegistration<T> registerListener(InstanceIdentifier<?> path,
T listener) {
- return new BindingDOMMountPointListenerAdapter<T>(listener,codec,mountService);
+ return new BindingDOMMountPointListenerAdapter<>(listener, codec, mountService);
}
}
}
@Override
- public ListenableFuture<? extends Object> offerNotification(final Notification notification) {
+ public ListenableFuture<?> offerNotification(final Notification notification) {
ListenableFuture<?> offerResult = domPublishService.offerNotification(toDomNotification(notification));
return DOMNotificationPublishService.REJECTED.equals(offerResult)
? NotificationPublishService.REJECTED
}
@Override
- public ListenableFuture<? extends Object> offerNotification(final Notification notification, final int timeout, final TimeUnit unit) throws InterruptedException {
+ public ListenableFuture<?> offerNotification(final Notification notification, final int timeout, final TimeUnit unit) throws InterruptedException {
ListenableFuture<?> offerResult = domPublishService.offerNotification(toDomNotification(notification), timeout, unit);
return DOMNotificationPublishService.REJECTED.equals(offerResult)
? NotificationPublishService.REJECTED
* return non-null value.
*/
final BindingCodecTreeNode<?> codecContext = currentCodecTree.getSubtreeCodec(bindingPath);
- return new SimpleEntry<InstanceIdentifier<?>, BindingCodecTreeNode<?>>(bindingPath, codecContext);
+ return new SimpleEntry<>(bindingPath, codecContext);
}
@SuppressWarnings("unchecked")
final DataObjectSerializerGenerator streamWriter = StreamWriterGenerator.create(JavassistUtils.forClassPool(ClassPool.getDefault()));
final BindingNormalizedNodeCodecRegistry registry = new BindingNormalizedNodeCodecRegistry(streamWriter);
codec = new BindingToNormalizedNodeCodec(GeneratedClassLoadingStrategy.getTCCLClassLoadingStrategy(), registry, true);
- };
+ }
@Test
public void testComplexAugmentationSerialization() {
private static final InstanceIdentifier<TopLevelList> BAR_PATH = path(TOP_BAR_KEY);
private static final PathArgument BAR_ARGUMENT = Iterables.getLast(BAR_PATH.getPathArguments());
private static final TopLevelList BAR_DATA = topLevelList(TOP_BAR_KEY);
-private static final DataTreeIdentifier<Top> TOP_IDENTIFIER = new DataTreeIdentifier<Top>(LogicalDatastoreType.OPERATIONAL,
- TOP_PATH);
+ private static final DataTreeIdentifier<Top> TOP_IDENTIFIER =
+ new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL, TOP_PATH);
private static final Top TOP_INITIAL_DATA = top(FOO_DATA);
}
public static <T extends Augmentable<T>> AugmentationVerifier<T> from(T obj) {
- return new AugmentationVerifier<T>(obj);
+ return new AugmentationVerifier<>(obj);
}
}