aboutsummaryrefslogtreecommitdiffstats
path: root/vpp-api
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-10-14 11:45:00 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2016-10-19 12:46:45 +0000
commit1ce0879900031d530333799dbfa564e66b8dcf80 (patch)
tree4adec3a11176d64283ff074987becca4054dd9d0 /vpp-api
parent1357f3b175b4d5b05fb25e9be356695fea9f7e35 (diff)
Fix coverity issues in jvpp (newlines + CompletableDumpFuture.ctxId)
Change-Id: I2931982ac1ae64313a6ab781212793620af24585 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'vpp-api')
-rw-r--r--vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackApiTest.java10
-rw-r--r--vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackJVppFacadeNotificationTest.java4
-rw-r--r--vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackJVppFacadeTest.java12
-rw-r--r--vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackNotificationApiTest.java2
-rw-r--r--vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/ControlPingTest.java2
-rw-r--r--vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CreateSubInterfaceTest.java2
-rw-r--r--vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/FutureApiTest.java6
-rw-r--r--vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/L2AclTest.java10
-rw-r--r--vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/NotificationUtils.java2
-rw-r--r--vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/future/AbstractFutureJVppInvoker.java6
10 files changed, 28 insertions, 28 deletions
diff --git a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackApiTest.java b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackApiTest.java
index 32c796ddbb5..3e1eb0a6124 100644
--- a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackApiTest.java
+++ b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackApiTest.java
@@ -37,13 +37,13 @@ public class CallbackApiTest {
@Override
public void onGetNodeIndexReply(final GetNodeIndexReply msg) {
- System.out.printf("Received GetNodeIndexReply: %s\n", msg);
+ System.out.printf("Received GetNodeIndexReply: %s%n", msg);
}
@Override
public void onShowVersionReply(final ShowVersionReply msg) {
System.out.printf("Received ShowVersionReply: context=%d, program=%s, version=%s, "
- + "buildDate=%s, buildDirectory=%s\n",
+ + "buildDate=%s, buildDirectory=%s%n",
msg.context, new String(msg.program), new String(msg.version),
new String(msg.buildDate), new String(msg.buildDirectory));
}
@@ -51,14 +51,14 @@ public class CallbackApiTest {
@Override
public void onSwInterfaceDetails(final SwInterfaceDetails msg) {
System.out.printf("Received SwInterfaceDetails: interfaceName=%s, l2AddressLength=%d, adminUpDown=%d, "
- + "linkUpDown=%d, linkSpeed=%d, linkMtu=%d\n",
+ + "linkUpDown=%d, linkSpeed=%d, linkMtu=%d%n",
new String(msg.interfaceName), msg.l2AddressLength, msg.adminUpDown,
msg.linkUpDown, msg.linkSpeed, (int) msg.linkMtu);
}
@Override
public void onError(VppCallbackException ex) {
- System.out.printf("Received onError exception: call=%s, context=%d, retval=%d\n", ex.getMethodName(),
+ System.out.printf("Received onError exception: call=%s, context=%d, retval=%d%n", ex.getMethodName(),
ex.getCtxId(), ex.getErrorCode());
}
}
@@ -76,7 +76,7 @@ public class CallbackApiTest {
System.out.println("Sending ShowVersion request...");
final int result = jvpp.send(new ShowVersion());
- System.out.printf("ShowVersion send result = %d\n", result);
+ System.out.printf("ShowVersion send result = %d%n", result);
System.out.println("Sending GetNodeIndex request...");
GetNodeIndex getNodeIndexRequest = new GetNodeIndex();
diff --git a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackJVppFacadeNotificationTest.java b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackJVppFacadeNotificationTest.java
index 1713e221274..f8845d622d6 100644
--- a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackJVppFacadeNotificationTest.java
+++ b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackJVppFacadeNotificationTest.java
@@ -50,7 +50,7 @@ public class CallbackJVppFacadeNotificationTest {
@Override
public void onError(final VppCallbackException ex) {
- System.out.printf("Received onError exception: call=%s, context=%d, retval=%d\n",
+ System.out.printf("Received onError exception: call=%s, context=%d, retval=%d%n",
ex.getMethodName(), ex.getCtxId(), ex.getErrorCode());
}
});
@@ -69,7 +69,7 @@ public class CallbackJVppFacadeNotificationTest {
@Override
public void onError(final VppCallbackException ex) {
- System.out.printf("Received onError exception: call=%s, context=%d, retval=%d\n",
+ System.out.printf("Received onError exception: call=%s, context=%d, retval=%d%n",
ex.getMethodName(), ex.getCtxId(), ex.getErrorCode());
}
});
diff --git a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackJVppFacadeTest.java b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackJVppFacadeTest.java
index 4a0fd3e5418..ac79b097048 100644
--- a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackJVppFacadeTest.java
+++ b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackJVppFacadeTest.java
@@ -38,13 +38,13 @@ public class CallbackJVppFacadeTest {
@Override
public void onShowVersionReply(final ShowVersionReply msg) {
System.out.printf("ShowVersionCallback1 received ShowVersionReply: context=%d, program=%s,"
- + "version=%s, buildDate=%s, buildDirectory=%s\n", msg.context, new String(msg.program),
+ + "version=%s, buildDate=%s, buildDirectory=%s%n", msg.context, new String(msg.program),
new String(msg.version), new String(msg.buildDate), new String(msg.buildDirectory));
}
@Override
public void onError(VppCallbackException ex) {
- System.out.printf("Received onError exception in showVersionCallback1: call=%s, reply=%d, context=%d\n",
+ System.out.printf("Received onError exception in showVersionCallback1: call=%s, reply=%d, context=%d%n",
ex.getMethodName(), ex.getErrorCode(), ex.getCtxId());
}
};
@@ -53,13 +53,13 @@ public class CallbackJVppFacadeTest {
@Override
public void onShowVersionReply(final ShowVersionReply msg) {
System.out.printf("ShowVersionCallback2 received ShowVersionReply: context=%d, program=%s,"
- + "version=%s, buildDate=%s, buildDirectory=%s\n", msg.context, new String(msg.program),
+ + "version=%s, buildDate=%s, buildDirectory=%s%n", msg.context, new String(msg.program),
new String(msg.version), new String(msg.buildDate), new String(msg.buildDirectory));
}
@Override
public void onError(VppCallbackException ex) {
- System.out.printf("Received onError exception in showVersionCallback2: call=%s, reply=%d, context=%d\n",
+ System.out.printf("Received onError exception in showVersionCallback2: call=%s, reply=%d, context=%d%n",
ex.getMethodName(), ex.getErrorCode(), ex.getCtxId());
}
@@ -68,12 +68,12 @@ public class CallbackJVppFacadeTest {
private static GetNodeIndexCallback getNodeIndexCallback = new GetNodeIndexCallback() {
@Override
public void onGetNodeIndexReply(final GetNodeIndexReply msg) {
- System.out.printf("Received GetNodeIndexReply: %s\n", msg);
+ System.out.printf("Received GetNodeIndexReply: %s%n", msg);
}
@Override
public void onError(VppCallbackException ex) {
- System.out.printf("Received onError exception in getNodeIndexCallback: call=%s, reply=%d, context=%d\n",
+ System.out.printf("Received onError exception in getNodeIndexCallback: call=%s, reply=%d, context=%d%n",
ex.getMethodName(), ex.getErrorCode(), ex.getCtxId());
}
};
diff --git a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackNotificationApiTest.java b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackNotificationApiTest.java
index ad65632f7b1..a4b8702c0a4 100644
--- a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackNotificationApiTest.java
+++ b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackNotificationApiTest.java
@@ -56,7 +56,7 @@ public class CallbackNotificationApiTest {
@Override
public void onError(VppCallbackException ex) {
- System.out.printf("Received onError exception in getNodeIndexCallback: call=%s, reply=%d, context=%d\n",
+ System.out.printf("Received onError exception in getNodeIndexCallback: call=%s, reply=%d, context=%d%n",
ex.getMethodName(), ex.getErrorCode(), ex.getCtxId());
}
diff --git a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/ControlPingTest.java b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/ControlPingTest.java
index 939ba887053..ecf61a535c8 100644
--- a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/ControlPingTest.java
+++ b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/ControlPingTest.java
@@ -35,7 +35,7 @@ public class ControlPingTest {
registry.register(jvpp, new ControlPingCallback() {
@Override
public void onControlPingReply(final ControlPingReply reply) {
- System.out.printf("Received ControlPingReply: %s\n", reply);
+ System.out.printf("Received ControlPingReply: %s%n", reply);
}
@Override
diff --git a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CreateSubInterfaceTest.java b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CreateSubInterfaceTest.java
index e63a7136b82..43605849821 100644
--- a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CreateSubInterfaceTest.java
+++ b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CreateSubInterfaceTest.java
@@ -77,7 +77,7 @@ public class CreateSubInterfaceTest {
}
private static void print(CreateSubifReply reply) {
- System.out.printf("CreateSubifReply: %s\n", reply);
+ System.out.printf("CreateSubifReply: %s%n", reply);
}
private static void testCreateSubInterface() throws Exception {
diff --git a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/FutureApiTest.java b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/FutureApiTest.java
index f570e1276ee..80c1108d279 100644
--- a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/FutureApiTest.java
+++ b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/FutureApiTest.java
@@ -46,7 +46,7 @@ public class FutureApiTest {
final ShowVersionReply reply = replyFuture.get();
LOG.info(
String.format(
- "Received ShowVersionReply: context=%d, program=%s, version=%s, buildDate=%s, buildDirectory=%s\n",
+ "Received ShowVersionReply: context=%d, program=%s, version=%s, buildDate=%s, buildDirectory=%s%n",
reply.context, new String(reply.program), new String(reply.version), new String(reply.buildDate),
new String(reply.buildDirectory)));
}
@@ -79,7 +79,7 @@ public class FutureApiTest {
final GetNodeIndexReply reply = replyFuture.get();
LOG.info(
String.format(
- "Received GetNodeIndexReply: context=%d, nodeIndex=%d\n", reply.context, reply.nodeIndex));
+ "Received GetNodeIndexReply: context=%d, nodeIndex=%d%n", reply.context, reply.nodeIndex));
} catch (Exception e) {
LOG.log(Level.SEVERE, "GetNodeIndex request failed", e);
}
@@ -97,7 +97,7 @@ public class FutureApiTest {
Objects.requireNonNull(details, "reply.swInterfaceDetails contains null element!");
LOG.info(
String.format("Received SwInterfaceDetails: interfaceName=%s, l2AddressLength=%d, adminUpDown=%d, "
- + "linkUpDown=%d, linkSpeed=%d, linkMtu=%d\n",
+ + "linkUpDown=%d, linkSpeed=%d, linkMtu=%d%n",
new String(details.interfaceName), details.l2AddressLength, details.adminUpDown,
details.linkUpDown, details.linkSpeed, (int) details.linkMtu));
}
diff --git a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/L2AclTest.java b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/L2AclTest.java
index 583f71d828f..d7da5ecbaf3 100644
--- a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/L2AclTest.java
+++ b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/L2AclTest.java
@@ -111,11 +111,11 @@ public class L2AclTest {
}
private static void print(ClassifyAddDelTableReply reply) {
- System.out.printf("ClassifyAddDelTableReply: %s\n", reply);
+ System.out.printf("ClassifyAddDelTableReply: %s%n", reply);
}
private static void print(ClassifyTableIdsReply reply) {
- System.out.printf("ClassifyTableIdsReply: %s\n", reply);
+ System.out.printf("ClassifyTableIdsReply: %s%n", reply);
}
private static void print(final ClassifyTableInfoReply reply) {
@@ -126,7 +126,7 @@ public class L2AclTest {
}
private static void print(ClassifyAddDelSessionReply reply) {
- System.out.printf("ClassifyAddDelSessionReply: context=%s\n", reply);
+ System.out.printf("ClassifyAddDelSessionReply: context=%s%n", reply);
}
private static void print(final ClassifySessionDetailsReplyDump reply) {
@@ -138,11 +138,11 @@ public class L2AclTest {
}
private static void print(final InputAclSetInterfaceReply reply) {
- System.out.printf("InputAclSetInterfaceReply: context=%s\n", reply);
+ System.out.printf("InputAclSetInterfaceReply: context=%s%n", reply);
}
private static void print(final ClassifyTableByInterfaceReply reply) {
- System.out.printf("ClassifyAddDelTableReply: %s\n", reply);
+ System.out.printf("ClassifyAddDelTableReply: %s%n", reply);
}
private static void testL2Acl() throws Exception {
diff --git a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/NotificationUtils.java b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/NotificationUtils.java
index 46d57adfe3a..f82946c3a5f 100644
--- a/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/NotificationUtils.java
+++ b/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/NotificationUtils.java
@@ -26,7 +26,7 @@ final class NotificationUtils {
private NotificationUtils() {}
static PrintStream printNotification(final SwInterfaceSetFlagsNotification msg) {
- return System.out.printf("Received interface notification: ifc: %s\n", msg);
+ return System.out.printf("Received interface notification: ifc: %s%n", msg);
}
static SwInterfaceSetFlags getChangeInterfaceState() {
diff --git a/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/future/AbstractFutureJVppInvoker.java b/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/future/AbstractFutureJVppInvoker.java
index 2067a91a1d1..ed8b8db804d 100644
--- a/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/future/AbstractFutureJVppInvoker.java
+++ b/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/future/AbstractFutureJVppInvoker.java
@@ -116,14 +116,14 @@ public abstract class AbstractFutureJVppInvoker implements FutureJVppInvoker {
public static final class CompletableDumpFuture<T extends JVppReplyDump<?, ?>> extends CompletableFuture<T> {
private final T replyDump;
- private final long contextId;
+ private final int contextId;
- public CompletableDumpFuture(final long contextId, final T emptyDump) {
+ public CompletableDumpFuture(final int contextId, final T emptyDump) {
this.contextId = contextId;
this.replyDump = emptyDump;
}
- public long getContextId() {
+ public int getContextId() {
return contextId;
}