Integrate MRI projects for Neon
[netconf.git] / restconf / restconf-common / src / main / java / org / opendaylight / restconf / common / errors / RestconfDocumentedException.java
index dd93c534ba1ed1ec626487d4a6dc72549e231aa8..0d1868e03d3c9a933b9895e21527f0c103e4d1d0 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.restconf.common.errors;
 
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
 import java.util.Collection;
@@ -35,7 +34,7 @@ public class RestconfDocumentedException extends WebApplicationException {
 
     private static final long serialVersionUID = 1L;
 
-    private final List<RestconfError> errors;
+    private final ImmutableList<RestconfError> errors;
     private final Status status;
 
     /**
@@ -140,7 +139,7 @@ public class RestconfDocumentedException extends WebApplicationException {
      * Constructs an instance with the given RpcErrors.
      */
     public RestconfDocumentedException(final String message, final Throwable cause,
-                                       final Collection<RpcError> rpcErrors) {
+                                       final Collection<? extends RpcError> rpcErrors) {
         this(message, cause, convertToRestconfErrors(rpcErrors));
     }
 
@@ -163,7 +162,7 @@ public class RestconfDocumentedException extends WebApplicationException {
         status = null;
     }
 
-    private static List<RestconfError> convertToRestconfErrors(final Collection<RpcError> rpcErrors) {
+    private static List<RestconfError> convertToRestconfErrors(final Collection<? extends RpcError> rpcErrors) {
         final List<RestconfError> errorList = Lists.newArrayList();
         if (rpcErrors != null) {
             for (RpcError rpcError : rpcErrors) {