Use Optional.isEmpty()
[netconf.git] / netconf / netconf-topology-singleton / src / main / java / org / opendaylight / netconf / topology / singleton / impl / actors / NetconfDataTreeServiceActor.java
index e6923c22b4c0481ee1684e843c4491781cf8271e..7f007d146fc279e433d5f7c53f1ea60f03625b89 100644 (file)
@@ -187,7 +187,7 @@ public final class NetconfDataTreeServiceActor extends UntypedAbstractActor {
         Futures.addCallback(feature, new FutureCallback<>() {
             @Override
             public void onSuccess(final Optional<NormalizedNode<?, ?>> result) {
-                if (!result.isPresent()) {
+                if (result.isEmpty()) {
                     sender.tell(new EmptyReadResponse(), self);
                     return;
                 }