From 3cfca691ac5e33c7886eb1d4a6ddab4869b4b654 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 12:57:13 +0000 Subject: [PATCH 1/4] Bump com.opengamma:corporate-parent from 2.8.1 to 3.0.3 Bumps com.opengamma:corporate-parent from 2.8.1 to 3.0.3. --- updated-dependencies: - dependency-name: com.opengamma:corporate-parent dependency-version: 3.0.3 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- examples/pom.xml | 2 +- modules/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/pom.xml b/examples/pom.xml index 42abdba..2380724 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -5,7 +5,7 @@ com.opengamma corporate-parent - 2.8.1 + 3.0.3 com.opengamma.sdk diff --git a/modules/pom.xml b/modules/pom.xml index ecc7f78..2455777 100644 --- a/modules/pom.xml +++ b/modules/pom.xml @@ -5,7 +5,7 @@ com.opengamma corporate-parent - 2.8.1 + 3.0.3 com.opengamma.sdk From 4dd041a74a9b5d213ff783414bea6f02272a71b7 Mon Sep 17 00:00:00 2001 From: Marc Llort Date: Tue, 28 Jul 2026 15:20:13 +0200 Subject: [PATCH 2/4] Make PortfolioDataFileTest JDK-independent: compare gzip/zip output by decoded content instead of hardcoded/raw bytes --- .../sdk/margin/PortfolioDataFileTest.java | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/modules/margin/src/test/java/com/opengamma/sdk/margin/PortfolioDataFileTest.java b/modules/margin/src/test/java/com/opengamma/sdk/margin/PortfolioDataFileTest.java index 4787c95..b20d257 100644 --- a/modules/margin/src/test/java/com/opengamma/sdk/margin/PortfolioDataFileTest.java +++ b/modules/margin/src/test/java/com/opengamma/sdk/margin/PortfolioDataFileTest.java @@ -7,6 +7,7 @@ import static org.assertj.core.api.Assertions.assertThat; +import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -15,9 +16,12 @@ import java.nio.file.Paths; import java.util.Arrays; import java.util.Base64; +import java.util.LinkedHashMap; +import java.util.Map; import java.util.Random; import java.util.zip.GZIPOutputStream; import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; import org.joda.beans.Bean; @@ -34,7 +38,7 @@ public class PortfolioDataFileTest { public void test_ofString_small() { PortfolioDataFile test = PortfolioDataFile.of("name.txt", "a=b"); assertThat(test.getName()).isEqualTo("name.txt.gz.base64"); - assertThat(test.getData()).isEqualTo("H4sIAAAAAAAAAEu0TQIAzzAAfwMAAAA="); + assertThat(test.getData()).isEqualTo(Base64.getEncoder().encodeToString(gzip("a=b"))); } @Test @@ -101,12 +105,30 @@ public void test_ofBean_trade() { //------------------------------------------------------------------------- @Test - public void test_ofCombined() { + public void test_ofCombined() throws IOException { Path path1 = Paths.get("src/test/resources/simple.xml"); Path path2 = Paths.get("src/test/resources/simple.xls"); PortfolioDataFile test = PortfolioDataFile.ofCombined(Arrays.asList(path1, path2)); assertThat(test.getName()).isEqualTo("JavaSDK.zip.base64"); - assertThat(test.getData()).isEqualTo(Base64.getEncoder().encodeToString(zip(path1, path2))); + byte[] actualZipBytes = Base64.getDecoder().decode(test.getData()); + assertThat(unzipEntries(actualZipBytes)).isEqualTo(unzipEntries(zip(path1, path2))); + } + + private static Map unzipEntries(byte[] zipBytes) throws IOException { + Map entries = new LinkedHashMap<>(); + try (ZipInputStream zis = new ZipInputStream(new ByteArrayInputStream(zipBytes))) { + ZipEntry entry; + while ((entry = zis.getNextEntry()) != null) { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + byte[] buf = new byte[4096]; + int len; + while ((len = zis.read(buf)) != -1) { + baos.write(buf, 0, len); + } + entries.put(entry.getName(), Base64.getEncoder().encodeToString(baos.toByteArray())); + } + } + return entries; } private static byte[] gzip(String str) { From 85f004f4c8e66e85297471b365ae614871c84aab Mon Sep 17 00:00:00 2001 From: Marc Llort Date: Tue, 28 Jul 2026 15:24:44 +0200 Subject: [PATCH 3/4] Pin maven.compiler.source/target/release to Java 8; corporate-parent 3.0.3 defaults to Java 21 --- modules/pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/pom.xml b/modules/pom.xml index 2455777..3f561fe 100644 --- a/modules/pom.xml +++ b/modules/pom.xml @@ -411,6 +411,10 @@ + + 1.8 + 1.8 + 8 3.25.3 1.82 From f6b7faa7dca019b07d64f4fa50ede284dead21a3 Mon Sep 17 00:00:00 2001 From: Marc Llort Date: Tue, 28 Jul 2026 15:27:48 +0200 Subject: [PATCH 4/4] Pin maven.compiler.source/target/release to Java 8 in examples module too --- examples/pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/pom.xml b/examples/pom.xml index 2380724..9d87c9e 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -66,6 +66,10 @@ + + 1.8 + 1.8 + 8 1.2.13