Adopt odlparent-10.0.0/yangtools-8.0.0-SNAPSHOT
[mdsal.git] / common / mdsal-common-api / src / main / java / org / opendaylight / mdsal / common / api / OptimisticLockFailedException.java
index a5d2c11dfe77cfa021114501f83c51e7b5b9515c..037777a6fadd74c569d4983e24004050f8855c02 100644 (file)
@@ -5,35 +5,27 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.mdsal.common.api;
 
-import org.opendaylight.yangtools.yang.common.RpcError.ErrorType;
+import org.opendaylight.yangtools.yang.common.ErrorTag;
+import org.opendaylight.yangtools.yang.common.ErrorType;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
-
 /**
-* Failure of asynchronous transaction commit caused by failure
-* of optimistic locking.
-* This exception is raised and returned when transaction commit
-* failed, because other transaction finished successfully
-* and modified same data as failed transaction.
-*  Clients may recover from this error condition by
-*  retrieving current state and submitting new updated
-*  transaction.
-*
+* Failure of asynchronous transaction commit caused by failure of optimistic locking. This exception is raised and
+* returned when transaction commit failed, because other transaction finished successfully and modified same data as
+* failed transaction. Clients may recover from this error condition by retrieving current state and submitting a new
+* updated transaction.
 */
 public class OptimisticLockFailedException extends TransactionCommitFailedException {
-
     private static final long serialVersionUID = 1L;
 
     public OptimisticLockFailedException(final String message, final Throwable cause) {
-        super(message, cause, RpcResultBuilder.newError(ErrorType.APPLICATION, "resource-denied",
-                                                        message, null, null, cause));
+        super(message, cause,
+            RpcResultBuilder.newError(ErrorType.APPLICATION, ErrorTag.RESOURCE_DENIED, message, null, null, cause));
     }
 
     public OptimisticLockFailedException(final String message) {
         this(message, null);
     }
-
 }