Use Optional.isEmpty()
[netconf.git] / netconf / sal-netconf-connector / src / main / java / org / opendaylight / netconf / sal / connect / netconf / LibraryModulesSchemas.java
index a82b39b7ce20d9aa8e3b640af047857b4c331ac2..6ef857742968ea71292f57265c606fd94bb9b4f5 100644 (file)
@@ -264,7 +264,7 @@ public final class LibraryModulesSchemas implements NetconfDeviceSchemas {
             LOG.warn("Unable to download yang library from {}", connection.getURL(), e);
         }
 
-        if (!optionalModulesStateNode.isPresent()) {
+        if (optionalModulesStateNode.isEmpty()) {
             return new LibraryModulesSchemas(ImmutableMap.of());
         }