Use Optional.isEmpty()
[netconf.git] / restconf / restconf-nb-bierman02 / src / main / java / org / opendaylight / netconf / sal / rest / impl / XmlToPatchBodyReader.java
index a1f3b4b1591636a89a8e3d606c6664a91f66bbc6..ef5be04b77866049f851e65befceff4af4c52071 100644 (file)
@@ -99,7 +99,7 @@ public class XmlToPatchBodyReader extends AbstractIdentifierAwareJaxRsProvider i
         try {
             final InstanceIdentifierContext<?> path = getInstanceIdentifierContext();
             final Optional<InputStream> nonEmptyInputStreamOptional = RestUtil.isInputStreamEmpty(entityStream);
-            if (!nonEmptyInputStreamOptional.isPresent()) {
+            if (nonEmptyInputStreamOptional.isEmpty()) {
                 // represent empty nopayload input
                 return new PatchContext(path, null, null);
             }