From de89423f3eacdb6fe4e0c54f2effe1ddd6b1fdc8 Mon Sep 17 00:00:00 2001 From: Patrick Doyle Date: Sun, 18 Feb 2024 14:45:47 -0500 Subject: [PATCH] Don't use compact constructor syntax for Manifest. There's a JDK bug where it doesn't work. --- .../src/main/java/io/vena/bosk/drivers/mongo/Manifest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bosk-mongo/src/main/java/io/vena/bosk/drivers/mongo/Manifest.java b/bosk-mongo/src/main/java/io/vena/bosk/drivers/mongo/Manifest.java index 402765e6..b345c140 100644 --- a/bosk-mongo/src/main/java/io/vena/bosk/drivers/mongo/Manifest.java +++ b/bosk-mongo/src/main/java/io/vena/bosk/drivers/mongo/Manifest.java @@ -13,10 +13,15 @@ public record Manifest( Optional sequoia, Optional pando ) implements StateTreeNode { - public Manifest { + public Manifest(Integer version, Optional sequoia, Optional pando) { + // Note: this could be a compact constructor, but then it won't work: + // https://github.com/adoptium/adoptium-support/issues/1025 if (sequoia.isPresent() == pando.isPresent()) { throw new IllegalArgumentException("Exactly one format (sequoia or pando) must be specified in manifest"); } + this.version = version; + this.sequoia = sequoia; + this.pando = pando; } public record EmptyNode() implements StateTreeNode { }