2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.openflowplugin.openflow.md.core;
10 import java.util.Collection;
11 import java.util.Collections;
12 import org.opendaylight.controller.sal.common.util.Rpcs;
13 import org.opendaylight.yangtools.yang.common.RpcError;
14 import org.opendaylight.yangtools.yang.common.RpcResult;
17 * Created by Martin Bobak mbobak@cisco.com on 8/25/14.
19 public class RpcResultsUtil {
27 public static <T> RpcResult<T> createRpcResult(boolean success, T result, Collection<RpcError> errorsArg) {
28 Collection<RpcError> errors = errorsArg;
30 errors = Collections.emptyList();
32 return Rpcs.getRpcResult(success, result, errors);