Fix various warnings
[netconf.git] / restconf / sal-rest-connector / src / main / java / org / opendaylight / netconf / sal / rest / impl / JsonNormalizedNodeBodyReader.java
index 3b7d07e716e7ffd24320f67d48a35f1dc92085e4..0f558fa229743c088398f22591363dcbd4d8a9d9 100644 (file)
@@ -77,9 +77,9 @@ public class JsonNormalizedNodeBodyReader
                         new org.opendaylight.restconf.jersey.providers.JsonNormalizedNodeBodyReader();
                 jsonReaderNewRest.injectParams(getUriInfo(), getRequest());
                 return jsonReaderNewRest.readFrom(type, genericType, annotations, mediaType, httpHeaders, entityStream);
-            } else {
-                return readFrom(getInstanceIdentifierContext(), entityStream, isPost());
             }
+
+            return readFrom(getInstanceIdentifierContext(), entityStream, isPost());
         } catch (final Exception e) {
             propagateExceptionAs(e);
             return null; // no-op
@@ -130,8 +130,8 @@ public class JsonNormalizedNodeBodyReader
         final List<YangInstanceIdentifier.PathArgument> iiToDataList = new ArrayList<>();
         InstanceIdentifierContext<? extends SchemaNode> newIIContext;
 
-        while ((result instanceof AugmentationNode) || (result instanceof ChoiceNode)) {
-            final Object childNode = ((DataContainerNode) result).getValue().iterator().next();
+        while (result instanceof AugmentationNode || result instanceof ChoiceNode) {
+            final Object childNode = ((DataContainerNode<?>) result).getValue().iterator().next();
             if (isPost) {
                 iiToDataList.add(result.getIdentifier());
             }