diff options
author | Ole Troan <ot@cisco.com> | 2018-11-28 11:36:05 +0100 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2018-12-13 12:11:50 +0000 |
commit | 413f4a5b2123c1625d615315db293a080078482b (patch) | |
tree | 6cfd8376c1d84b93793b062731ec9594487dc95e /extras/japi/java/jvpp-core/io | |
parent | 6f666ad99ae1e384aa851af5e0feed3d2a25e709 (diff) |
API: Use string type instead of u8.
The new string type is modelled after string in proto3.
It is always variable length.
Change-Id: I64884067e28a80072c8dac31b7c7c82d6e306051
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'extras/japi/java/jvpp-core/io')
4 files changed, 19 insertions, 19 deletions
diff --git a/extras/japi/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackApiExample.java b/extras/japi/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackApiExample.java index b99979cf301..b6558ffaa7e 100644 --- a/extras/japi/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackApiExample.java +++ b/extras/japi/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackApiExample.java @@ -77,17 +77,17 @@ public class CallbackApiExample { System.out.printf("Received ShowVersionReply: context=%d, program=%s, version=%s, " + "buildDate=%s, buildDirectory=%s%n", msg.context, - new String(msg.program, StandardCharsets.UTF_8), - new String(msg.version, StandardCharsets.UTF_8), - new String(msg.buildDate, StandardCharsets.UTF_8), - new String(msg.buildDirectory, StandardCharsets.UTF_8)); + msg.program, + msg.version, + msg.buildDate, + msg.buildDirectory); } @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", - new String(msg.interfaceName, StandardCharsets.UTF_8), msg.l2AddressLength, msg.adminUpDown, + msg.interfaceName, msg.l2AddressLength, msg.adminUpDown, msg.linkUpDown, msg.linkSpeed, (int) msg.linkMtu); } diff --git a/extras/japi/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeExample.java b/extras/japi/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeExample.java index dc2bdcba569..a8b91860b75 100644 --- a/extras/japi/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeExample.java +++ b/extras/japi/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeExample.java @@ -39,10 +39,10 @@ public class CallbackJVppFacadeExample { 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, StandardCharsets.UTF_8), - new String(msg.version, StandardCharsets.UTF_8), - new String(msg.buildDate, StandardCharsets.UTF_8), - new String(msg.buildDirectory, StandardCharsets.UTF_8)); + msg.program, + msg.version, + msg.buildDate, + msg.buildDirectory); } @Override @@ -57,10 +57,10 @@ public class CallbackJVppFacadeExample { 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, StandardCharsets.UTF_8), - new String(msg.version, StandardCharsets.UTF_8), - new String(msg.buildDate, StandardCharsets.UTF_8), - new String(msg.buildDirectory, StandardCharsets.UTF_8)); + msg.program, + msg.version, + msg.buildDate, + msg.buildDirectory); } @Override diff --git a/extras/japi/java/jvpp-core/io/fd/vpp/jvpp/core/examples/FutureApiExample.java b/extras/japi/java/jvpp-core/io/fd/vpp/jvpp/core/examples/FutureApiExample.java index 931c9b337aa..030e68995a2 100644 --- a/extras/japi/java/jvpp-core/io/fd/vpp/jvpp/core/examples/FutureApiExample.java +++ b/extras/japi/java/jvpp-core/io/fd/vpp/jvpp/core/examples/FutureApiExample.java @@ -47,10 +47,10 @@ public class FutureApiExample { LOG.info( String.format( "Received ShowVersionReply: context=%d, program=%s, version=%s, buildDate=%s, buildDirectory=%s%n", - reply.context, new String(reply.program, StandardCharsets.UTF_8), - new String(reply.version, StandardCharsets.UTF_8), - new String(reply.buildDate, StandardCharsets.UTF_8), - new String(reply.buildDirectory, StandardCharsets.UTF_8))); + reply.context, reply.program, + reply.version, + reply.buildDate, + reply.buildDirectory)); } private static void testEmptyBridgeDomainDump(final FutureJVppCoreFacade jvpp) throws Exception { @@ -100,7 +100,7 @@ public class FutureApiExample { LOG.info( String.format("Received SwInterfaceDetails: interfaceName=%s, l2AddressLength=%d, adminUpDown=%d, " + "linkUpDown=%d, linkSpeed=%d, linkMtu=%d%n", - new String(details.interfaceName, StandardCharsets.UTF_8), + details.interfaceName, details.l2AddressLength, details.adminUpDown, details.linkUpDown, details.linkSpeed, (int) details.linkMtu)); } diff --git a/extras/japi/java/jvpp-core/io/fd/vpp/jvpp/core/examples/L2AclExample.java b/extras/japi/java/jvpp-core/io/fd/vpp/jvpp/core/examples/L2AclExample.java index 9a17136a6d9..0be85d4f17f 100644 --- a/extras/japi/java/jvpp-core/io/fd/vpp/jvpp/core/examples/L2AclExample.java +++ b/extras/japi/java/jvpp-core/io/fd/vpp/jvpp/core/examples/L2AclExample.java @@ -75,7 +75,7 @@ public class L2AclExample { hexChars[j * 2] = hexArray[v >>> 4]; hexChars[j * 2 + 1] = hexArray[v & 0x0F]; } - return new String(hexChars); + return new java.lang.String(hexChars); } private static ClassifyTableInfo createClassifyTableInfoRequest(final int tableId) { |