From da6e2a545018ad24380f541ff8c4beafb577deb1 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Fri, 24 Aug 2018 08:22:32 +0200 Subject: Remove redundant ReadFailedException from Reader.isPresent Change-Id: Ia64b0869d1f2d9620d233f31077e72d887ef4716 Signed-off-by: Marek Gradzki --- .../src/main/java/io/fd/honeycomb/translate/read/Reader.java | 3 +-- .../main/java/io/fd/honeycomb/translate/impl/read/GenericReader.java | 3 +-- .../main/java/io/fd/honeycomb/translate/spi/read/ReaderCustomizer.java | 2 +- .../java/io/fd/honeycomb/translate/util/read/DelegatingReader.java | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/Reader.java b/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/Reader.java index 7138006e0..252d79e84 100644 --- a/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/Reader.java +++ b/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/Reader.java @@ -46,8 +46,7 @@ public interface Reader> extends Subt * * @return true if the result value is present. */ - boolean isPresent(@Nonnull InstanceIdentifier id, @Nonnull D built, @Nonnull ReadContext ctx) - throws ReadFailedException; + boolean isPresent(@Nonnull InstanceIdentifier id, @Nonnull D built, @Nonnull ReadContext ctx); /** * Reads data identified by id diff --git a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericReader.java b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericReader.java index 2bf439f82..ee29383c9 100644 --- a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericReader.java +++ b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericReader.java @@ -75,8 +75,7 @@ public class GenericReader> } @Override - public boolean isPresent(final InstanceIdentifier id, final C built, final ReadContext ctx) - throws ReadFailedException { + public boolean isPresent(final InstanceIdentifier id, final C built, final ReadContext ctx) { return customizer.isPresent(id, built, ctx); } diff --git a/infra/translate-spi/src/main/java/io/fd/honeycomb/translate/spi/read/ReaderCustomizer.java b/infra/translate-spi/src/main/java/io/fd/honeycomb/translate/spi/read/ReaderCustomizer.java index 738431eea..df8e975bb 100644 --- a/infra/translate-spi/src/main/java/io/fd/honeycomb/translate/spi/read/ReaderCustomizer.java +++ b/infra/translate-spi/src/main/java/io/fd/honeycomb/translate/spi/read/ReaderCustomizer.java @@ -68,7 +68,7 @@ public interface ReaderCustomizer> { * * @return true if value is present (even if empty) */ - default boolean isPresent(final InstanceIdentifier id, final O built, final ReadContext ctx) throws ReadFailedException { + default boolean isPresent(final InstanceIdentifier id, final O built, final ReadContext ctx) { // Default impl = check whether read value is empty return !built.equals(getBuilder(id).build()); } diff --git a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/DelegatingReader.java b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/DelegatingReader.java index a0cee9295..5e2e7062e 100644 --- a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/DelegatingReader.java +++ b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/DelegatingReader.java @@ -63,7 +63,7 @@ public interface DelegatingReader> ex } @Override - default boolean isPresent(InstanceIdentifier id, D built, final ReadContext ctx) throws ReadFailedException { + default boolean isPresent(InstanceIdentifier id, D built, final ReadContext ctx) { return getDelegate().isPresent(id, built, ctx); } -- cgit 1.2.3-korg