Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Code cleanup (sal-common-util)
[controller.git]
/
opendaylight
/
md-sal
/
sal-common-util
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
sal
/
common
/
util
/
Rpcs.java
diff --git
a/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/Rpcs.java
b/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/Rpcs.java
index 356ec8ff7c5ee6e84692970d702910b7bdc8c091..9ffe8ab0644036ed210e0151514312374c2d08a1 100644
(file)
--- a/
opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/Rpcs.java
+++ b/
opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/Rpcs.java
@@
-8,9
+8,7
@@
package org.opendaylight.controller.sal.common.util;
import java.io.Serializable;
package org.opendaylight.controller.sal.common.util;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.Collection;
import java.util.Collection;
-import java.util.Collections;
import org.opendaylight.yangtools.concepts.Immutable;
import org.opendaylight.yangtools.yang.common.RpcError;
import org.opendaylight.yangtools.concepts.Immutable;
import org.opendaylight.yangtools.yang.common.RpcError;
@@
-18,25
+16,27
@@
import org.opendaylight.yangtools.yang.common.RpcResult;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableList;
+/**
+ * @deprecated Use {@link org.opendaylight.yangtools.yang.common.RpcResultBuilder}
+ */
+@Deprecated
public class Rpcs {
public class Rpcs {
-
+
public static <T> RpcResult<T> getRpcResult(boolean successful) {
public static <T> RpcResult<T> getRpcResult(boolean successful) {
- RpcResult<T> ret = new RpcResultTO<T>(successful, null, ImmutableList.<RpcError>of());
- return ret;
+ return new RpcResultTO<>(successful, null, ImmutableList.of());
}
}
-
+
public static <T> RpcResult<T> getRpcResult(boolean successful, T result,
Collection<RpcError> errors) {
public static <T> RpcResult<T> getRpcResult(boolean successful, T result,
Collection<RpcError> errors) {
- RpcResult<T> ret = new RpcResultTO<T>(successful, result, errors);
- return ret;
+ return new RpcResultTO<>(successful, result, errors);
}
public static <T> RpcResult<T> getRpcResult(boolean successful, Collection<RpcError> errors) {
}
public static <T> RpcResult<T> getRpcResult(boolean successful, Collection<RpcError> errors) {
- return new RpcResultTO<
T
>(successful, null, errors);
+ return new RpcResultTO<>(successful, null, errors);
}
}
-
- private static class RpcResultTO<T> implements RpcResult<T>, Serializable, Immutable {
+ private static class RpcResultTO<T> implements RpcResult<T>, Serializable, Immutable {
+ private static final long serialVersionUID = 1L;
private final Collection<RpcError> errors;
private final T result;
private final boolean successful;
private final Collection<RpcError> errors;
private final T result;
private final boolean successful;