From 6e00ba6bc6ead5b6d5215cf89cdfeaec08eac9d4 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Wed, 27 Jun 2018 21:13:29 +0200 Subject: bgp: mark parameters of hc2vpp RouteWriters as @NonNull Requires https://gerrit.fd.io/r/#/c/13254/ Change-Id: Icacf161f1c47f9471f19b0d89e5f2396942537ec Signed-off-by: Marek Gradzki --- .../java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriter.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'bgp/bgp-prefix-sid') diff --git a/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriter.java b/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriter.java index 472642e73..f62e03576 100644 --- a/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriter.java +++ b/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriter.java @@ -24,7 +24,6 @@ import io.fd.honeycomb.translate.write.WriteFailedException; import io.fd.vpp.jvpp.core.dto.MplsRouteAddDel; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import javax.annotation.Nonnull; -import javax.annotation.Nullable; 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.rib.rev171207.BgpRib; @@ -60,7 +59,7 @@ final class BgpPrefixSidMplsWriter @Override public void create(@Nonnull final InstanceIdentifier id, - @Nullable final LabeledUnicastRoute route) + @Nonnull final LabeledUnicastRoute route) throws WriteFailedException.CreateFailedException { LOG.debug("Translating id={}, route={}", id, route); // Compute label based on BGP Prefix SID TLVs and add following VPP FIB entries @@ -82,7 +81,7 @@ final class BgpPrefixSidMplsWriter @Override public void delete(@Nonnull final InstanceIdentifier id, - @Nullable final LabeledUnicastRoute route) + @Nonnull final LabeledUnicastRoute route) throws WriteFailedException.DeleteFailedException { LOG.debug("Removing id={}, route={}", id, route); // Remove non-eos VPP MPLS FIB entry: @@ -101,8 +100,8 @@ final class BgpPrefixSidMplsWriter @Override public void update(@Nonnull final InstanceIdentifier id, - @Nullable final LabeledUnicastRoute routeBefore, - @Nullable final LabeledUnicastRoute routeAfter) + @Nonnull final LabeledUnicastRoute routeBefore, + @Nonnull final LabeledUnicastRoute routeAfter) throws WriteFailedException.UpdateFailedException { throw new WriteFailedException.UpdateFailedException(id, routeBefore, routeAfter, new UnsupportedOperationException("Operation not supported")); -- cgit 1.2.3-korg