diff options
Diffstat (limited to 'v3po/translate-impl')
4 files changed, 8 insertions, 8 deletions
diff --git a/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/CompositeChildReader.java b/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/CompositeChildReader.java index 1984cd86d..89f9f5675 100644 --- a/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/CompositeChildReader.java +++ b/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/CompositeChildReader.java @@ -93,7 +93,7 @@ public final class CompositeChildReader<C extends DataObject, B extends Builder< */ public CompositeChildReader(@Nonnull final Class<C> managedDataObjectType, @Nonnull final ChildReaderCustomizer<C, B> customizer) { - this(managedDataObjectType, RWUtils.<C>emptyChildReaderList(), RWUtils.<C>emptyAugReaderList(), + this(managedDataObjectType, RWUtils.emptyChildReaderList(), RWUtils.emptyAugReaderList(), customizer); } @@ -112,7 +112,7 @@ public final class CompositeChildReader<C extends DataObject, B extends Builder< protected void readCurrentAttributes(@Nonnull final InstanceIdentifier<C> id, @Nonnull final B builder, @Nonnull final ReadContext ctx) throws ReadFailedException { - customizer.readCurrentAttributes(id, builder, ctx.getContext()); + customizer.readCurrentAttributes(id, builder, ctx); } @Override diff --git a/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/CompositeListReader.java b/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/CompositeListReader.java index 4c84c3afe..7c438f669 100644 --- a/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/CompositeListReader.java +++ b/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/CompositeListReader.java @@ -124,7 +124,7 @@ public final class CompositeListReader<C extends DataObject & Identifiable<K>, K public List<C> readList(@Nonnull final InstanceIdentifier<C> id, @Nonnull final ReadContext ctx) throws ReadFailedException { LOG.trace("{}: Reading all list entries", this); - final List<K> allIds = customizer.getAllIds(id, ctx.getContext()); + final List<K> allIds = customizer.getAllIds(id, ctx); LOG.debug("{}: Reading list entries for: {}", this, allIds); final ArrayList<C> allEntries = new ArrayList<>(allIds.size()); @@ -146,7 +146,7 @@ public final class CompositeListReader<C extends DataObject & Identifiable<K>, K protected void readCurrentAttributes(@Nonnull final InstanceIdentifier<C> id, @Nonnull final B builder, @Nonnull final ReadContext ctx) throws ReadFailedException { - customizer.readCurrentAttributes(id, builder, ctx.getContext()); + customizer.readCurrentAttributes(id, builder, ctx); } @Override diff --git a/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/CompositeRootReader.java b/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/CompositeRootReader.java index 0abae70be..ea157aafd 100644 --- a/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/CompositeRootReader.java +++ b/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/CompositeRootReader.java @@ -99,7 +99,7 @@ public final class CompositeRootReader<C extends DataObject, B extends Builder<C @Override protected void readCurrentAttributes(@Nonnull final InstanceIdentifier<C> id, @Nonnull final B builder, @Nonnull final ReadContext ctx) throws ReadFailedException { - customizer.readCurrentAttributes(id, builder, ctx.getContext()); + customizer.readCurrentAttributes(id, builder, ctx); } @Override diff --git a/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/write/AbstractCompositeWriter.java b/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/write/AbstractCompositeWriter.java index 580910e8c..8b42a6c6f 100644 --- a/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/write/AbstractCompositeWriter.java +++ b/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/write/AbstractCompositeWriter.java @@ -232,7 +232,7 @@ public abstract class AbstractCompositeWriter<D extends DataObject> implements W // If there's no dedicated writer, use write current // But we need current data after to do so final InstanceIdentifier<D> currentId = RWUtils.cutId(id, getManagedDataObjectType()); - Optional<DataObject> currentDataAfter = ctx.readAfter(currentId); + Optional<D> currentDataAfter = ctx.readAfter(currentId); LOG.debug("{}: Dedicated subtree writer missing for: {}. Writing current.", this, RWUtils.getNextId(id, getManagedDataObjectType()).getType(), currentDataAfter); writeCurrent(currentId, castToManaged(currentDataAfter.get()), ctx); @@ -260,8 +260,8 @@ public abstract class AbstractCompositeWriter<D extends DataObject> implements W private void updateSubtreeFromCurrent(final InstanceIdentifier<? extends DataObject> id, final WriteContext ctx) throws WriteFailedException { final InstanceIdentifier<D> currentId = RWUtils.cutId(id, getManagedDataObjectType()); - Optional<DataObject> currentDataBefore = ctx.readBefore(currentId); - Optional<DataObject> currentDataAfter = ctx.readAfter(currentId); + Optional<D> currentDataBefore = ctx.readBefore(currentId); + Optional<D> currentDataAfter = ctx.readAfter(currentId); LOG.debug("{}: Dedicated subtree writer missing for: {}. Updating current without subtree", this, RWUtils.getNextId(id, getManagedDataObjectType()).getType(), currentDataAfter); updateCurrent((InstanceIdentifier<D>) id, castToManaged(currentDataBefore.orNull()), |