Send node details notification up to the application,
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / RpcUtil.java
index c56cc174df42cf612f64a56c7c871d123889288b..925a327b65791b134f0fea2044cc7ac7bc7559f7 100644 (file)
@@ -17,19 +17,19 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 public abstract class RpcUtil {
 
     /**
-     * @param result
-     * @throws Throwable 
+     * @param result rpc result
+     * @throws Exception exception thrown by method if rpc fails
      */
-    public static void smokeRpc(RpcResult<?> result) throws Throwable {
+    public static void smokeRpc(RpcResult<?> result) throws Exception {
         if (!result.isSuccessful()) {
             Throwable firstCause = null;
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             for (RpcError error : result.getErrors()) {
                 if (firstCause != null) {
                     firstCause = error.getCause();
                 }
                 
-                sb.append("rpcError:").append(error.getCause().getMessage()).append(";");
+                sb.append("rpcError:").append(error.getCause().getMessage()).append(';');
             }
             throw new Exception(sb.toString(), firstCause);
         }