From e5f2f5516ebd2c55f071936f66ed2f0ae0d959a8 Mon Sep 17 00:00:00 2001 From: Oleksandr Lazarenko Date: Fri, 26 Jun 2026 10:17:12 +0200 Subject: [PATCH] BUILD: Target Java 8 for the published library. --- pom.xml | 17 ++++++++++++++++- src/main/java/com/swancommunity/owid/Io.java | 6 +++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 518498b..ec3dd08 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,11 @@ - 21 + + 8 UTF-8 5.10.2 @@ -41,6 +45,17 @@ org.apache.maven.plugins maven-compiler-plugin 3.13.0 + + + + default-testCompile + + 17 + + + org.apache.maven.plugins diff --git a/src/main/java/com/swancommunity/owid/Io.java b/src/main/java/com/swancommunity/owid/Io.java index 9d0af1d..17de59d 100644 --- a/src/main/java/com/swancommunity/owid/Io.java +++ b/src/main/java/com/swancommunity/owid/Io.java @@ -175,7 +175,7 @@ static void writeString(ByteArrayOutputStream buffer, String value) throw new OwidException("domain '" + value + "' is not valid"); } } - buffer.writeBytes(bytes); + buffer.write(bytes, 0, bytes.length); buffer.write(0); } @@ -198,7 +198,7 @@ static void writeByteArray(ByteArrayOutputStream buffer, byte[] value) + "' exceeds the unsigned 32 bit limit"); } writeUInt32(buffer, value.length); - buffer.writeBytes(value); + buffer.write(value, 0, value.length); } /** Writes the fixed length signature, validating the length. */ @@ -207,7 +207,7 @@ static void writeSignature(ByteArrayOutputStream buffer, byte[] value) if (value.length != Owid.SIGNATURE_LENGTH) { throw invalidSignatureLength(value.length); } - buffer.writeBytes(value); + buffer.write(value, 0, value.length); } /** Writes the date using the encoding associated with the version. */