Use Optional.isEmpty()
[netconf.git] / netconf / netconf-topology-singleton / src / main / java / org / opendaylight / netconf / topology / singleton / impl / actors / ReadAdapter.java
index b34f846d9e5edac62798ba0789c491d7d39e47f9..2a56fe7e2aa53860f6a755e426dc93c371b3d91c 100644 (file)
@@ -51,7 +51,7 @@ class ReadAdapter {
         tx.read(store, path).addCallback(new FutureCallback<Optional<NormalizedNode<?, ?>>>() {
             @Override
             public void onSuccess(final Optional<NormalizedNode<?, ?>> result) {
-                if (!result.isPresent()) {
+                if (result.isEmpty()) {
                     sender.tell(new EmptyReadResponse(), self);
                     return;
                 }