Point out a few more ugly casts
[netconf.git] / restconf / restconf-nb / src / main / java / org / opendaylight / restconf / nb / rfc8040 / rests / services / impl / CreateStreamUtil.java
index e2800435e03c17c16b1f3ae9854eac701e77c0a1..71e22d205dca927511aa78467a84f817cebac8ef 100644 (file)
@@ -153,12 +153,14 @@ final class CreateStreamUtil {
             final EffectiveModelContext refSchemaCtx, final SubscribeToStreamUtil streamUtil,
             final DOMMountPointService mountPointService) {
         // parsing out of container with settings and path
+        // FIXME: ugly cast
         final ContainerNode data = (ContainerNode) requireNonNull(payload).getData();
+        // FIXME: ugly cast
         final YangInstanceIdentifier value =
             (YangInstanceIdentifier) data.findChildByArg(DEVICE_NOTIFICATION_PATH_NODEID)
-            .map(DataContainerChild::body)
-            .orElseThrow(() -> new RestconfDocumentedException("Mount point not available", ErrorType.APPLICATION,
-                ErrorTag.OPERATION_FAILED));
+                .map(DataContainerChild::body)
+                .orElseThrow(() -> new RestconfDocumentedException("Mount point not available", ErrorType.APPLICATION,
+                    ErrorTag.OPERATION_FAILED));
 
         // FIXME: just beautiful: a ClassCastException if it is something different!
         final String deviceName =