X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-common-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fcommon%2Fapi%2Fdata%2FDataValidationFailedException.java;h=38ef5d8ff45f1380dceaec5f6c6a71e27a00dd5c;hb=refs%2Fchanges%2F77%2F84577%2F1;hp=bc393dde4fd8561829007d30b0794a105c98eb22;hpb=a28080b967656fe74811b56d9ff8070eab794ad1;p=controller.git diff --git a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataValidationFailedException.java b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataValidationFailedException.java index bc393dde4f..38ef5d8ff4 100644 --- a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataValidationFailedException.java +++ b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/DataValidationFailedException.java @@ -7,7 +7,8 @@ */ package org.opendaylight.controller.md.sal.common.api.data; -import com.google.common.base.Preconditions; +import static java.util.Objects.requireNonNull; + import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.opendaylight.yangtools.concepts.Path; import org.opendaylight.yangtools.yang.common.RpcError.ErrorType; @@ -41,12 +42,12 @@ public class DataValidationFailedException extends TransactionCommitFailedExcept final String message, final Throwable cause) { super(message, cause, RpcResultBuilder.newError(ErrorType.APPLICATION, "invalid-value", message, null, path != null ? path.toString() : null, cause)); - this.pathType = Preconditions.checkNotNull(pathType, "path type must not be null"); - this.path = Preconditions.checkNotNull(path,"path must not be null."); + this.pathType = requireNonNull(pathType, "path type must not be null"); + this.path = requireNonNull(path,"path must not be null."); } - public

> DataValidationFailedException(final Class

pathType,final P path, - final String message) { + public

> DataValidationFailedException(final Class

pathType,final P path, + final String message) { this(pathType, path, message, null); }