Use Optional.isEmpty()
[netconf.git] / netconf / mdsal-netconf-connector / src / main / java / org / opendaylight / netconf / mdsal / connector / ops / AbstractEdit.java
index 2576641b8386f889c89d14cf3338065e0c30caac..acf55aab5bcf1bea52adda1c480120b216932d8b 100644 (file)
@@ -87,7 +87,7 @@ abstract class AbstractEdit extends AbstractConfigOperation {
         final String elementName = element.getName();
         final Optional<DataSchemaNode> schemaNode = module.findDataChildByName(QName.create(module.getQNameModule(),
                     element.getName()));
-        if (!schemaNode.isPresent()) {
+        if (schemaNode.isEmpty()) {
             throw new DocumentedException(
                 "Unable to find node " + elementName + " with namespace: " + namespace + "in module: "
                     + module.toString(),