X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fcommon%2FRpcResultBuilder.java;h=690e29517dde914ae3c3dac9add327431d474f40;hb=481a692d463636bbcf75f023da71703913e1b605;hp=c063366a476945a068e3795718712085d8c0aa04;hpb=2ad7dfb32db26fd4e9d423640a1fc8fab503d7f0;p=yangtools.git diff --git a/yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/RpcResultBuilder.java b/yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/RpcResultBuilder.java index c063366a47..690e29517d 100644 --- a/yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/RpcResultBuilder.java +++ b/yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/RpcResultBuilder.java @@ -11,11 +11,9 @@ package org.opendaylight.yangtools.yang.common; import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; - import java.io.Serializable; import java.util.Collection; import java.util.Collections; - import org.opendaylight.yangtools.concepts.Builder; import org.opendaylight.yangtools.yang.common.RpcError.ErrorSeverity; import org.opendaylight.yangtools.yang.common.RpcError.ErrorType; @@ -59,7 +57,7 @@ public final class RpcResultBuilder implements Builder> { } @Override - public String toString(){ + public String toString() { return "RpcResult [successful=" + successful + ", result=" + result + ", errors=" + errors + "]"; } @@ -109,7 +107,7 @@ public final class RpcResultBuilder implements Builder> { } @Override - public String getMessage(){ + public String getMessage() { return message; } @@ -124,7 +122,7 @@ public final class RpcResultBuilder implements Builder> { } @Override - public String toString(){ + public String toString() { return "RpcError [message=" + message + ", severity=" + severity + ", errorType=" + errorType + ", tag=" + tag + ", applicationTag=" + applicationTag + ", info=" + info @@ -154,7 +152,7 @@ public final class RpcResultBuilder implements Builder> { * @param result the result value */ public static RpcResultBuilder success( final T result ) { - return new RpcResultBuilder( true, result ); + return new RpcResultBuilder( true, result ); } /** @@ -291,7 +289,7 @@ public final class RpcResultBuilder implements Builder> { private void addError( final RpcError error ) { - if( errors == null ) { + if (errors == null) { errors = new ImmutableList.Builder(); } @@ -400,8 +398,8 @@ public final class RpcResultBuilder implements Builder> { * @param errors the list of RpcErrors */ public RpcResultBuilder withRpcErrors( final Collection errors ) { - if( errors != null ) { - for( RpcError error: errors ) { + if (errors != null) { + for (RpcError error : errors) { addError( error ); } }