diff options
Diffstat (limited to 'infra')
2 files changed, 9 insertions, 11 deletions
diff --git a/infra/bgp-translate-api/src/main/java/io/fd/honeycomb/translate/bgp/RouteWriter.java b/infra/bgp-translate-api/src/main/java/io/fd/honeycomb/translate/bgp/RouteWriter.java index a88d149ad..5f2b11b8c 100644 --- a/infra/bgp-translate-api/src/main/java/io/fd/honeycomb/translate/bgp/RouteWriter.java +++ b/infra/bgp-translate-api/src/main/java/io/fd/honeycomb/translate/bgp/RouteWriter.java @@ -20,7 +20,6 @@ import com.google.common.annotations.Beta; import io.fd.honeycomb.translate.SubtreeManager; import io.fd.honeycomb.translate.write.WriteFailedException; import javax.annotation.Nonnull; -import javax.annotation.Nullable; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.Route; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -40,7 +39,7 @@ public interface RouteWriter<R extends Route> extends SubtreeManager<R> { * @throws WriteFailedException.CreateFailedException if create was unsuccessful */ void create(@Nonnull final InstanceIdentifier<R> id, - @Nullable final R dataAfter) throws WriteFailedException.CreateFailedException; + @Nonnull final R dataAfter) throws WriteFailedException.CreateFailedException; /** * Handles delete operation. @@ -49,7 +48,7 @@ public interface RouteWriter<R extends Route> extends SubtreeManager<R> { * @throws WriteFailedException.DeleteFailedException if delete was unsuccessful */ void delete(@Nonnull final InstanceIdentifier<R> id, - @Nullable final R dataBefore) throws WriteFailedException.DeleteFailedException; + @Nonnull final R dataBefore) throws WriteFailedException.DeleteFailedException; /** * Handles update operation. @@ -59,6 +58,6 @@ public interface RouteWriter<R extends Route> extends SubtreeManager<R> { * @throws WriteFailedException.UpdateFailedException if update was unsuccessful */ void update(@Nonnull final InstanceIdentifier<R> id, - @Nullable final R dataBefore, - @Nullable final R dataAfter) throws WriteFailedException.UpdateFailedException; + @Nonnull final R dataBefore, + @Nonnull final R dataAfter) throws WriteFailedException.UpdateFailedException; } diff --git a/infra/bgp-translate-impl/src/main/test/java/io/fd/honeycomb/bgp/translate/impl/LocRibWriterTest.java b/infra/bgp-translate-impl/src/main/test/java/io/fd/honeycomb/bgp/translate/impl/LocRibWriterTest.java index 754264dac..c4a23c1f1 100644 --- a/infra/bgp-translate-impl/src/main/test/java/io/fd/honeycomb/bgp/translate/impl/LocRibWriterTest.java +++ b/infra/bgp-translate-impl/src/main/test/java/io/fd/honeycomb/bgp/translate/impl/LocRibWriterTest.java @@ -21,7 +21,6 @@ import static org.opendaylight.controller.md.sal.common.api.data.LogicalDatastor import io.fd.honeycomb.translate.bgp.RouteWriter; import io.fd.honeycomb.translate.write.WriteFailedException; import javax.annotation.Nonnull; -import javax.annotation.Nullable; import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentMatchers; @@ -32,8 +31,8 @@ import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv4.routes.Ipv4Routes; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv4.routes.ipv4.routes.Ipv4RouteKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv4.routes.ipv4.routes.Ipv4Route; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv4.routes.ipv4.routes.Ipv4RouteKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.routes.LabeledUnicastRoutes; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.routes.list.LabeledUnicastRoute; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.PathId; @@ -126,18 +125,18 @@ public class LocRibWriterTest { } @Override - public void create(@Nonnull final InstanceIdentifier id, @Nullable final Route dataAfter) + public void create(@Nonnull final InstanceIdentifier id, @Nonnull final Route dataAfter) throws WriteFailedException.CreateFailedException { } @Override - public void delete(@Nonnull final InstanceIdentifier id, @Nullable final Route dataBefore) + public void delete(@Nonnull final InstanceIdentifier id, @Nonnull final Route dataBefore) throws WriteFailedException.DeleteFailedException { } @Override - public void update(@Nonnull final InstanceIdentifier id, @Nullable final Route dataBefore, - @Nullable final Route dataAfter) throws WriteFailedException.UpdateFailedException { + public void update(@Nonnull final InstanceIdentifier id, @Nonnull final Route dataBefore, + @Nonnull final Route dataAfter) throws WriteFailedException.UpdateFailedException { } } }
\ No newline at end of file |