From e73ad9436e08adc2717dae52ae9690b4b7eb54c1 Mon Sep 17 00:00:00 2001 From: James White Date: Mon, 5 Aug 2024 16:39:22 +0100 Subject: [PATCH] Ensure toOnly collector supplier returns a new instance --- .../src/main/java/com/opengamma/strata/collect/Guavate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/collect/src/main/java/com/opengamma/strata/collect/Guavate.java b/modules/collect/src/main/java/com/opengamma/strata/collect/Guavate.java index 95bf48d9ee..cf18c1f704 100644 --- a/modules/collect/src/main/java/com/opengamma/strata/collect/Guavate.java +++ b/modules/collect/src/main/java/com/opengamma/strata/collect/Guavate.java @@ -829,7 +829,7 @@ static class OnlyCollector implements Collector, Optional @Override public Supplier> supplier() { - return () -> this; + return OnlyCollector::new; } @Override