Skip to content

Commit 416ba75

Browse files
committed
Set full paths on new values in set_array (#278)
1 parent 87e30a7 commit 416ba75

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

metafix/src/main/java/org/metafacture/metafix/FixMethod.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ public void apply(final Metafix metafix, final Record record, final List<String>
330330
final String field = params.get(0);
331331
final Value newValue = newArray(params.subList(1, params.size()).stream().map(Value::new));
332332
record.set(field, newValue);
333+
newValue.asArray().forEach(value -> value.withPathSet(newValue.getPath() + "." + value.getPath()));
333334
}
334335
},
335336
set_field {

metafix/src/test/java/org/metafacture/metafix/MetafixMethodTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2828,7 +2828,6 @@ public void setArrayWithoutReplaceAll() {
28282828
}
28292829

28302830
@Test
2831-
@MetafixToDo("See https://github.com/metafacture/metafacture-fix/issues/278")
28322831
public void setArrayWithReplaceAll() {
28332832
setArrayWithReplaceAll(true);
28342833
}

0 commit comments

Comments
 (0)