Use Optional.isEmpty()
[netconf.git] / restconf / restconf-nb-bierman02 / src / main / java / org / opendaylight / netconf / sal / rest / impl / JsonToPatchBodyReader.java
index 0f308b03382b7eaf95c9dbd46a4afbcc05bce008..de744eeef818773169e8d07064b3ab8649978e00 100644 (file)
@@ -104,7 +104,7 @@ public class JsonToPatchBodyReader extends AbstractIdentifierAwareJaxRsProvider
     private PatchContext readFrom(final InstanceIdentifierContext<?> path, final InputStream entityStream)
             throws IOException {
         final Optional<InputStream> nonEmptyInputStreamOptional = RestUtil.isInputStreamEmpty(entityStream);
-        if (!nonEmptyInputStreamOptional.isPresent()) {
+        if (nonEmptyInputStreamOptional.isEmpty()) {
             return new PatchContext(path, null, null);
         }