From 3b145298421d8fd7678b5687a62925119f35a80d Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Tue, 31 Jan 2017 13:25:53 +0100 Subject: jvpp: fix coverity warn: reliance on default encoding Change-Id: I8333b7d19ebdacac5445b4505750dd0a46764b36 Signed-off-by: Marek Gradzki --- .../jvpp-ioampot/io/fd/vpp/jvpp/ioampot/test/IoamPotApiTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/vpp-api/java/jvpp-ioampot/io/fd') diff --git a/src/vpp-api/java/jvpp-ioampot/io/fd/vpp/jvpp/ioampot/test/IoamPotApiTest.java b/src/vpp-api/java/jvpp-ioampot/io/fd/vpp/jvpp/ioampot/test/IoamPotApiTest.java index 74eb86a1873..391b25fb78c 100644 --- a/src/vpp-api/java/jvpp-ioampot/io/fd/vpp/jvpp/ioampot/test/IoamPotApiTest.java +++ b/src/vpp-api/java/jvpp-ioampot/io/fd/vpp/jvpp/ioampot/test/IoamPotApiTest.java @@ -24,6 +24,7 @@ import io.fd.vpp.jvpp.ioampot.JVppIoampotImpl; import io.fd.vpp.jvpp.ioampot.callback.PotProfileAddCallback; import io.fd.vpp.jvpp.ioampot.dto.PotProfileAdd; import io.fd.vpp.jvpp.ioampot.dto.PotProfileAddReply; +import java.nio.charset.StandardCharsets; public class IoamPotApiTest { @@ -62,8 +63,8 @@ public class IoamPotApiTest { request.maxBits = 53; request.lpc = 1234; request.polynomialPublic = 1234; - request.listNameLen = (byte)"test pot profile".getBytes().length; - request.listName = "test pot profile".getBytes(); + request.listNameLen = (byte)"test pot profile".getBytes(StandardCharsets.UTF_8).length; + request.listName = "test pot profile".getBytes(StandardCharsets.UTF_8); final int result = jvpp.send(request); System.out.printf("PotProfileAdd send result = %d%n", result); -- cgit 1.2.3-korg