Use Optional.isEmpty()
[netconf.git] / netconf / mdsal-netconf-connector / src / main / java / org / opendaylight / netconf / mdsal / connector / ops / AbstractConfigOperation.java
index 9e3989cc4996cafa8658605089c850fc53a16cdc..f6b827c25296bf565ef889bfed0739723cb46029 100644 (file)
@@ -58,7 +58,7 @@ abstract class AbstractConfigOperation extends AbstractSingletonNetconfOperation
         }
 
         final Optional<XmlElement> urlElement = parent.getOnlyChildElementOptionally(URL_KEY);
-        if (!urlElement.isPresent()) {
+        if (urlElement.isEmpty()) {
             throw new DocumentedException("Invalid RPC, neither <config> not <url> element is present",
                 DocumentedException.ErrorType.PROTOCOL,
                 DocumentedException.ErrorTag.MISSING_ELEMENT,