From fe84442c0f37983996ef02c31b660bc5235dce12 Mon Sep 17 00:00:00 2001 From: Fabian Steeg Date: Fri, 27 Sep 2024 14:22:07 +0200 Subject: [PATCH] Implement add(Value, boolean) using add(int, Value, boolean) (#127) --- metafix/src/main/java/org/metafacture/metafix/Value.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/metafix/src/main/java/org/metafacture/metafix/Value.java b/metafix/src/main/java/org/metafacture/metafix/Value.java index 1280e049..25d54496 100644 --- a/metafix/src/main/java/org/metafacture/metafix/Value.java +++ b/metafix/src/main/java/org/metafacture/metafix/Value.java @@ -433,9 +433,7 @@ public void add(final Value value) { } /* package-private */ void add(final Value value, final boolean appendToPath) { - if (!isNull(value)) { - list.add(appendToPath ? value.withPathAppend(list.size() + 1) : value); - } + add(list.size(), value, appendToPath); } /* package-private */ void add(final int index, final Value value) {