Adopt odlparent-10.0.0/yangtools-8.0.0-SNAPSHOT
[mdsal.git] / binding / mdsal-binding-dom-adapter / src / main / java / org / opendaylight / mdsal / binding / dom / adapter / RpcResultUtil.java
index ccc7c9434db043486268411e58b16a0a1f751533..179f276cd08afda147eebe9cd19a6675194db534 100644 (file)
@@ -12,8 +12,8 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.mdsal.dom.api.DOMActionResult;
 import org.opendaylight.mdsal.dom.api.DOMRpcResult;
+import org.opendaylight.yangtools.yang.common.ErrorSeverity;
 import org.opendaylight.yangtools.yang.common.RpcError;
-import org.opendaylight.yangtools.yang.common.RpcError.ErrorSeverity;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
@@ -30,7 +30,7 @@ final class RpcResultUtil {
      * DOMRpcResult does not have a notion of success, hence we have to reverse-engineer it by looking at reported
      * errors and checking whether they are just warnings.
      */
-    static <T> RpcResult<T> rpcResultFromDOM(final Collection<RpcError> errors, final @Nullable T result) {
+    static <T> RpcResult<T> rpcResultFromDOM(final Collection<? extends RpcError> errors, final @Nullable T result) {
         return RpcResultBuilder.<T>status(errors.stream().noneMatch(err -> err.getSeverity() == ErrorSeverity.ERROR))
                 .withResult(result).withRpcErrors(errors).build();
     }