Loosen RpcResultBuilder argument 10/75610/1
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 10 Aug 2018 10:57:10 +0000 (12:57 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 31 Aug 2018 08:27:08 +0000 (10:27 +0200)
withRpcErrors can accept a collection of any RpcError subclasses,
express that in the API contract.

Change-Id: I8f302874cb509474e3a974e3b4730338984eda78
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 5bdf2e72626b1cd8c9e98a984e9fc28465d72454)

yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/RpcResultBuilder.java

index 7b877ecb2ee315c500f8a935f9f77cc032b9723f..e47737610dac6f9f4934310b4498905d0495fe6c 100644 (file)
@@ -398,7 +398,7 @@ public final class RpcResultBuilder<T> implements Builder<RpcResult<T>> {
      *
      * @param rpcErrors the list of RpcErrors
      */
-    public RpcResultBuilder<T> withRpcErrors(final Collection<RpcError> rpcErrors) {
+    public RpcResultBuilder<T> withRpcErrors(final Collection<? extends RpcError> rpcErrors) {
         if (rpcErrors != null) {
             for (RpcError error : rpcErrors) {
                 addError(error);