diff options
Diffstat (limited to 'vespajlib')
-rw-r--r-- | vespajlib/abi-spec.json | 1 | ||||
-rw-r--r-- | vespajlib/pom.xml | 10 | ||||
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/vespa/objects/Identifiable.java | 9 |
3 files changed, 17 insertions, 3 deletions
diff --git a/vespajlib/abi-spec.json b/vespajlib/abi-spec.json index c426195bc37..5eeee267cf6 100644 --- a/vespajlib/abi-spec.json +++ b/vespajlib/abi-spec.json @@ -3428,6 +3428,7 @@ "protected static com.yahoo.vespa.objects.Identifiable deserializeOptional(com.yahoo.vespa.objects.Deserializer)", "protected static boolean equals(java.lang.Object, java.lang.Object)", "public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor)", + "protected static byte[] getRawUtf8Bytes(com.yahoo.vespa.objects.Deserializer)", "protected java.lang.String getUtf8(com.yahoo.vespa.objects.Deserializer)", "protected void putUtf8(com.yahoo.vespa.objects.Serializer, java.lang.String)", "public bridge synthetic java.lang.Object clone()" diff --git a/vespajlib/pom.xml b/vespajlib/pom.xml index 7be95661d9a..236e33b3a70 100644 --- a/vespajlib/pom.xml +++ b/vespajlib/pom.xml @@ -122,6 +122,16 @@ </configuration> </plugin> <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <!-- Illegal reflective access by com.yahoo.io.NativeIO --> + <argLine> + --add-opens=java.base/java.io=ALL-UNNAMED + </argLine> + </configuration> + </plugin> + <plugin> <groupId>com.yahoo.vespa</groupId> <artifactId>abi-check-plugin</artifactId> </plugin> diff --git a/vespajlib/src/main/java/com/yahoo/vespa/objects/Identifiable.java b/vespajlib/src/main/java/com/yahoo/vespa/objects/Identifiable.java index 8c11a0cbda1..947b312ac3b 100644 --- a/vespajlib/src/main/java/com/yahoo/vespa/objects/Identifiable.java +++ b/vespajlib/src/main/java/com/yahoo/vespa/objects/Identifiable.java @@ -354,10 +354,13 @@ public class Identifiable extends Selectable implements Cloneable { } } - protected String getUtf8(Deserializer buf) { + protected static byte[] getRawUtf8Bytes(Deserializer buf) { int len = buf.getInt(null); - byte[] arr = buf.getBytes(null, len); - return Utf8.toString(arr); + return buf.getBytes(null, len); + } + + protected String getUtf8(Deserializer buf) { + return Utf8.toString(getRawUtf8Bytes(buf)); } protected void putUtf8(Serializer buf, String val) { |