From 2b44e8008b5cfe1e54af40f2ba48aee8cc559ccd Mon Sep 17 00:00:00 2001 From: Tim Quinn Date: Tue, 26 Mar 2024 10:44:27 -0500 Subject: [PATCH] Set isMutated in single-update method also --- .../java/io/helidon/builder/codegen/TypeHandlerCollection.java | 1 + .../test/testsubjects/SingleValuedDefaultValuesBlueprint.java | 1 + 2 files changed, 2 insertions(+) diff --git a/builder/codegen/src/main/java/io/helidon/builder/codegen/TypeHandlerCollection.java b/builder/codegen/src/main/java/io/helidon/builder/codegen/TypeHandlerCollection.java index ffd2b1d516f..5d101949f5a 100644 --- a/builder/codegen/src/main/java/io/helidon/builder/codegen/TypeHandlerCollection.java +++ b/builder/codegen/src/main/java/io/helidon/builder/codegen/TypeHandlerCollection.java @@ -388,6 +388,7 @@ private void singularSetter(InnerClass.Builder classBuilder, .addContent(Objects.class) .addContentLine(".requireNonNull(" + singularName + ");") .addContentLine("this." + name() + ".add(" + singularName + ");") + .update(this::extraAdderContent) .addContentLine("return self();"); classBuilder.addMethod(builder); } diff --git a/builder/tests/builder/src/main/java/io/helidon/builder/test/testsubjects/SingleValuedDefaultValuesBlueprint.java b/builder/tests/builder/src/main/java/io/helidon/builder/test/testsubjects/SingleValuedDefaultValuesBlueprint.java index f310621ee90..515214721e6 100644 --- a/builder/tests/builder/src/main/java/io/helidon/builder/test/testsubjects/SingleValuedDefaultValuesBlueprint.java +++ b/builder/tests/builder/src/main/java/io/helidon/builder/test/testsubjects/SingleValuedDefaultValuesBlueprint.java @@ -26,6 +26,7 @@ interface SingleValuedDefaultValuesBlueprint { String DEFAULT_STRING = "defaultValue"; @Option.Default(DEFAULT_STRING) + @Option.Singular List strings(); }