Adopt odlparent-10.0.0/yangtools-8.0.0-SNAPSHOT
[mdsal.git] / dom / mdsal-dom-spi / src / main / java / org / opendaylight / mdsal / dom / spi / SimpleDOMActionResult.java
index aec8e492f58043cc5bd1bb37bdc6d9ed24cc3138..68645e8d124f1656ea9ececb3f5c1daa2d63cfe2 100644 (file)
@@ -20,8 +20,9 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.mdsal.dom.api.DOMActionResult;
 import org.opendaylight.yangtools.concepts.Immutable;
+import org.opendaylight.yangtools.yang.common.ErrorTag;
+import org.opendaylight.yangtools.yang.common.ErrorType;
 import org.opendaylight.yangtools.yang.common.RpcError;
-import org.opendaylight.yangtools.yang.common.RpcError.ErrorType;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
 
@@ -37,7 +38,7 @@ public final class SimpleDOMActionResult implements DOMActionResult, Immutable {
     }
 
     public SimpleDOMActionResult(final ContainerNode output) {
-        this.errors = ImmutableList.of();
+        errors = ImmutableList.of();
         this.output = requireNonNull(output);
     }
 
@@ -52,8 +53,8 @@ public final class SimpleDOMActionResult implements DOMActionResult, Immutable {
 
     // As per RFC7950 page 80 (top)
     public static SimpleDOMActionResult ofMalformedMessage(final Exception cause) {
-        return new SimpleDOMActionResult(ImmutableList.of(RpcResultBuilder.newError(ErrorType.RPC, "malformed-message",
-            cause.getMessage(), null, null, requireNonNull(cause))), null);
+        return new SimpleDOMActionResult(ImmutableList.of(RpcResultBuilder.newError(ErrorType.RPC,
+            ErrorTag.MALFORMED_MESSAGE, cause.getMessage(), null, null, requireNonNull(cause))), null);
     }
 
     @Override