Use Optional.isEmpty()
[netconf.git] / netconf / mdsal-netconf-notification / src / main / java / org / opendaylight / netconf / mdsal / notification / impl / ops / CreateSubscription.java
index 3f3d14ed96fabe49f555dbd3ee7be59fa640b810..685ba761881c2cf9521dd096a0d25e1b0918dac0 100644 (file)
@@ -69,12 +69,12 @@ public class CreateSubscription extends AbstractSingletonNetconfOperation
         // Replay not supported
         final Optional<XmlElement> startTime =
                 operationElement.getOnlyChildElementWithSameNamespaceOptionally("startTime");
-        checkArgument(!startTime.isPresent(), "StartTime element not yet supported");
+        checkArgument(startTime.isEmpty(), "StartTime element not yet supported");
 
         // Stop time not supported
         final Optional<XmlElement> stopTime =
                 operationElement.getOnlyChildElementWithSameNamespaceOptionally("stopTime");
-        checkArgument(!stopTime.isPresent(), "StopTime element not yet supported");
+        checkArgument(stopTime.isEmpty(), "StopTime element not yet supported");
 
         final StreamNameType streamNameType = parseStreamIfPresent(operationElement);