Use Optional.isEmpty()
[netconf.git] / restconf / restconf-nb-bierman02 / src / main / java / org / opendaylight / netconf / sal / restconf / impl / ControllerContext.java
index 627a9d9db2d40e28a3d07cb54f4793c26ebb81e0..1ff954517348d7cbade7e3cde0dc150fbc8ec755 100644 (file)
@@ -583,7 +583,7 @@ public final class ControllerContext implements EffectiveModelContextListener, C
 
                 final YangInstanceIdentifier partialPath = this.dataNormalizer.toNormalized(builder.build());
                 final Optional<DOMMountPoint> mountOpt = this.mountService.getMountPoint(partialPath);
-                if (!mountOpt.isPresent()) {
+                if (mountOpt.isEmpty()) {
                     LOG.debug("Instance identifier to missing mount point: {}", partialPath);
                     throw new RestconfDocumentedException("Mount point does not exist.", ErrorType.PROTOCOL,
                             ErrorTag.DATA_MISSING);