diff options
Diffstat (limited to 'infra/translate-utils/src/main')
-rw-r--r-- | infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/registry/CompositeReader.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/registry/CompositeReader.java b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/registry/CompositeReader.java index 91a195f44..e392228aa 100644 --- a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/registry/CompositeReader.java +++ b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/registry/CompositeReader.java @@ -111,7 +111,10 @@ class CompositeReader<D extends DataObject, B extends Builder<D>> extends Abstra LOG.debug("{}: Reading child from: {}", this, child); if (child instanceof ListReader) { final List<? extends DataObject> list = ((ListReader) child).readList(childId, ctx); - ((ListReader) child).merge(builder, list); + // Dont set empty lists + if (!list.isEmpty()) { + ((ListReader) child).merge(builder, list); + } } else { final Optional<? extends DataObject> read = child.read(childId, ctx); if (read.isPresent()) { |