summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Gradzki <margradz@gmail.com>2018-08-24 08:22:32 +0200
committerMarek Gradzki <margradz@gmail.com>2018-08-24 08:22:32 +0200
commitda6e2a545018ad24380f541ff8c4beafb577deb1 (patch)
tree614ac5bf5d05c33363feab8b1480352af13b6622
parentfa81283ec4192fc1b754a7862243f564365b0fb3 (diff)
Remove redundant ReadFailedException from Reader.isPresent
Change-Id: Ia64b0869d1f2d9620d233f31077e72d887ef4716 Signed-off-by: Marek Gradzki <margradz@gmail.com>
-rw-r--r--infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/Reader.java3
-rw-r--r--infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericReader.java3
-rw-r--r--infra/translate-spi/src/main/java/io/fd/honeycomb/translate/spi/read/ReaderCustomizer.java2
-rw-r--r--infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/DelegatingReader.java2
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<D extends DataObject, B extends Builder<D>> extends Subt
*
* @return true if the result value is present.
*/
- boolean isPresent(@Nonnull InstanceIdentifier<D> id, @Nonnull D built, @Nonnull ReadContext ctx)
- throws ReadFailedException;
+ boolean isPresent(@Nonnull InstanceIdentifier<D> 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<C extends DataObject, B extends Builder<C>>
}
@Override
- public boolean isPresent(final InstanceIdentifier<C> id, final C built, final ReadContext ctx)
- throws ReadFailedException {
+ public boolean isPresent(final InstanceIdentifier<C> 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<O extends DataObject, B extends Builder<O>> {
*
* @return true if value is present (even if empty)
*/
- default boolean isPresent(final InstanceIdentifier<O> id, final O built, final ReadContext ctx) throws ReadFailedException {
+ default boolean isPresent(final InstanceIdentifier<O> 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<D extends DataObject, B extends Builder<D>> ex
}
@Override
- default boolean isPresent(InstanceIdentifier<D> id, D built, final ReadContext ctx) throws ReadFailedException {
+ default boolean isPresent(InstanceIdentifier<D> id, D built, final ReadContext ctx) {
return getDelegate().isPresent(id, built, ctx);
}