* Remove unnecessary type specifiers (use Java 7 <>)
* Remove unnecessary "extends Object" declarations
* Remove unnecessary semi-colons
* Merge identical catch blocks
* Remove redundant modifiers:
- enum constructors are private by default
- interface properties are public static final by default
- interface methods are public abstract by default
- interfaces are abstract by default
- inner interfaces are static by default
- inner classes in interfaces are public static by default
Change-Id: Ia9ab5959dab860bc8220aff4390ca62c87ec8ecf
Signed-off-by: Stephen Kitt <skitt@redhat.com>
@SuppressWarnings({ "rawtypes", "unchecked" })
final BindingDOMDataTreeChangeListenerAdapter<T> domListener =
listener instanceof ClusteredDataTreeChangeListener ?
@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);
final ListenerRegistration<BindingDOMDataTreeChangeListenerAdapter<T>> domReg =
dataTreeChangeService.registerDataTreeChangeListener(domIdentifier, domListener);
@Override
public <T extends MountPointListener> ListenerRegistration<T> registerListener(InstanceIdentifier<?> path,
T listener) {
@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);
- 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
ListenableFuture<?> offerResult = domPublishService.offerNotification(toDomNotification(notification));
return DOMNotificationPublishService.REJECTED.equals(offerResult)
? NotificationPublishService.REJECTED
- 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
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 non-null value.
*/
final BindingCodecTreeNode<?> codecContext = currentCodecTree.getSubtreeCodec(bindingPath);
- return new SimpleEntry<InstanceIdentifier<?>, BindingCodecTreeNode<?>>(bindingPath, codecContext);
+ return new SimpleEntry<>(bindingPath, codecContext);
}
@SuppressWarnings("unchecked")
}
@SuppressWarnings("unchecked")
final DataObjectSerializerGenerator streamWriter = StreamWriterGenerator.create(JavassistUtils.forClassPool(ClassPool.getDefault()));
final BindingNormalizedNodeCodecRegistry registry = new BindingNormalizedNodeCodecRegistry(streamWriter);
codec = new BindingToNormalizedNodeCodec(GeneratedClassLoadingStrategy.getTCCLClassLoadingStrategy(), registry, true);
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() {
@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 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);
private static final Top TOP_INITIAL_DATA = top(FOO_DATA);
}
public static <T extends Augmentable<T>> AugmentationVerifier<T> from(T obj) {
}
public static <T extends Augmentable<T>> AugmentationVerifier<T> from(T obj) {
- return new AugmentationVerifier<T>(obj);
+ return new AugmentationVerifier<>(obj);