From 0827063002d7fc50b787f1e5f6bbbbdc09802787 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Wed, 22 Nov 2017 11:17:15 +0100 Subject: Add missing @Override annotations Fix isses reported by Sonar thanks to IntelliJ's code inspection. Change-Id: Ief7b4307d4b90e107f010d7feaa307776afaf947 Signed-off-by: Marek Gradzki --- .../io/fd/honeycomb/infra/distro/cfgattrs/CfgAttrsModule.java | 1 + .../infra/distro/data/ConfigAndOperationalPipelineModule.java | 1 + .../io/fd/honeycomb/infra/distro/data/DataTreeProvider.java | 3 +++ .../infra/distro/data/HoneycombDOMDataBrokerProvider.java | 1 + .../infra/distro/data/PersistingDataTreeProvider.java | 7 +++++++ .../data/context/HoneycombContextDOMDataBrokerProvider.java | 1 + .../infra/distro/initializer/InitializerPipelineModule.java | 1 + .../java/io/fd/honeycomb/infra/distro/schema/SchemaModule.java | 1 + .../honeycomb/infra/distro/schema/SchemaServiceProvider.java | 3 +++ .../infra/distro/schema/YangBindingProviderModule.java | 1 + .../northbound/bgp/extension/CommonBgpExtensionsModule.java | 1 + .../java/io/fd/honeycomb/infra/bgp/BgpConfigurationModule.java | 1 + .../bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpModule.java | 1 + .../main/java/io/fd/honeycomb/infra/bgp/BgpReadersModule.java | 1 + .../main/java/io/fd/honeycomb/infra/bgp/BgpWritersModule.java | 1 + .../fd/honeycomb/northbound/netconf/NetconfReadersModule.java | 1 + .../translate/impl/read/registry/CompositeReader.java | 1 + .../io/fd/honeycomb/translate/util/read/DelegatingReader.java | 10 ++++++++-- .../honeycomb/translate/util/read/KeepaliveReaderWrapper.java | 1 + 19 files changed, 36 insertions(+), 2 deletions(-) diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/cfgattrs/CfgAttrsModule.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/cfgattrs/CfgAttrsModule.java index b22e88593..29e79a2a9 100644 --- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/cfgattrs/CfgAttrsModule.java +++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/cfgattrs/CfgAttrsModule.java @@ -24,6 +24,7 @@ import net.jmob.guice.conf.core.ConfigurationModule; */ public class CfgAttrsModule extends AbstractModule { + @Override protected void configure() { install(ConfigurationModule.create()); // Inject non-dependency configuration diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/ConfigAndOperationalPipelineModule.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/ConfigAndOperationalPipelineModule.java index c1e67a5df..080caaf81 100644 --- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/ConfigAndOperationalPipelineModule.java +++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/ConfigAndOperationalPipelineModule.java @@ -45,6 +45,7 @@ public class ConfigAndOperationalPipelineModule extends PrivateModule { public static final String HONEYCOMB_CONFIG_NONPERSIST = "honeycomb-config-nopersist"; public static final String HONEYCOMB_CONFIG = "honeycomb-config"; + @Override protected void configure() { bind(ShutdownHandler.class).to(ShutdownHandlerImpl.class).in(Singleton.class); expose(ShutdownHandler.class); diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.java index 225102e1a..039a0ad82 100644 --- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.java +++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.java @@ -32,6 +32,7 @@ public abstract class DataTreeProvider extends ProviderTrait { @Inject private HoneycombConfiguration config; + @Override public TipProducingDataTree create() { TipProducingDataTree delegate = InMemoryDataTreeFactory.getInstance().create(getType()); delegate.setSchemaContext(schemaService.getGlobalContext()); @@ -41,6 +42,7 @@ public abstract class DataTreeProvider extends ProviderTrait { public abstract TreeType getType(); public static class ConfigDataTreeProvider extends DataTreeProvider { + @Override public TreeType getType() { return TreeType.CONFIGURATION; } @@ -48,6 +50,7 @@ public abstract class DataTreeProvider extends ProviderTrait { } public static class ContextDataTreeProvider extends DataTreeProvider { + @Override public TreeType getType() { return TreeType.OPERATIONAL; } diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMDataBrokerProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMDataBrokerProvider.java index c23530d57..ca9435081 100644 --- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMDataBrokerProvider.java +++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMDataBrokerProvider.java @@ -30,6 +30,7 @@ public final class HoneycombDOMDataBrokerProvider extends ProviderTrait @Inject protected HoneycombConfiguration config; + @Override public DataTree create() { return isEnabled() ? new PersistingDataTreeAdapter(getDelegate(), schemaService, Paths.get(getPath())) @@ -54,14 +55,17 @@ public abstract class PersistingDataTreeProvider extends ProviderTrait @Named(ConfigAndOperationalPipelineModule.HONEYCOMB_CONFIG_NONPERSIST) private DataTree delegate; + @Override public String getPath() { return config.peristConfigPath; } + @Override public TreeType getType() { return TreeType.CONFIGURATION; } + @Override public DataTree getDelegate() { return delegate; } @@ -78,14 +82,17 @@ public abstract class PersistingDataTreeProvider extends ProviderTrait @Named(ContextPipelineModule.HONEYCOMB_CONTEXT_NOPERSIST) private DataTree delegate; + @Override public String getPath() { return config.peristContextPath; } + @Override public TreeType getType() { return TreeType.OPERATIONAL; } + @Override public DataTree getDelegate() { return delegate; } diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/context/HoneycombContextDOMDataBrokerProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/context/HoneycombContextDOMDataBrokerProvider.java index 1ceed92c1..4c3965f35 100644 --- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/context/HoneycombContextDOMDataBrokerProvider.java +++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/context/HoneycombContextDOMDataBrokerProvider.java @@ -27,6 +27,7 @@ public final class HoneycombContextDOMDataBrokerProvider extends ProviderTrait { @Inject private ModuleInfoBackedContext mibCtx; + @Override public StaticSchemaService create() { return new StaticSchemaService(mibCtx.getSchemaContext()); } @@ -69,8 +70,10 @@ public final class SchemaServiceProvider extends ProviderTrait { final SchemaContextListener listener) { listener.onGlobalContextUpdated(schemaContext); return new ListenerRegistration() { + @Override public void close() {} + @Override public SchemaContextListener getInstance() { return listener; } diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/YangBindingProviderModule.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/YangBindingProviderModule.java index d705226bf..d43485f7e 100644 --- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/YangBindingProviderModule.java +++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/YangBindingProviderModule.java @@ -23,6 +23,7 @@ import org.slf4j.LoggerFactory; public class YangBindingProviderModule extends AbstractModule { private static final Logger LOG = LoggerFactory.getLogger(YangBindingProviderModule.class); + @Override protected void configure() { LOG.info("Configuring YangBindingProviderModule"); bind(YangModulesProvider.YangModules.class).toProvider(YangModulesProvider.class).asEagerSingleton(); diff --git a/infra/northbound/bgp-extensions/extension-common/src/main/java/io/fd/honeycomb/northbound/bgp/extension/CommonBgpExtensionsModule.java b/infra/northbound/bgp-extensions/extension-common/src/main/java/io/fd/honeycomb/northbound/bgp/extension/CommonBgpExtensionsModule.java index e5406dd44..2f8d8ccfc 100644 --- a/infra/northbound/bgp-extensions/extension-common/src/main/java/io/fd/honeycomb/northbound/bgp/extension/CommonBgpExtensionsModule.java +++ b/infra/northbound/bgp-extensions/extension-common/src/main/java/io/fd/honeycomb/northbound/bgp/extension/CommonBgpExtensionsModule.java @@ -33,6 +33,7 @@ import org.slf4j.LoggerFactory; public final class CommonBgpExtensionsModule extends AbstractModule { private static final Logger LOG = LoggerFactory.getLogger(CommonBgpExtensionsModule.class); + @Override protected void configure() { LOG.debug("Initializing CommonBgpExtensionsModule"); // This should be part of BgpModule, but that one is Private and Multibinders + private BASE_MODULES diff --git a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpConfigurationModule.java b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpConfigurationModule.java index 0efe7a12a..7f94682e2 100644 --- a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpConfigurationModule.java +++ b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpConfigurationModule.java @@ -24,6 +24,7 @@ import net.jmob.guice.conf.core.ConfigurationModule; */ final class BgpConfigurationModule extends AbstractModule { + @Override protected void configure() { install(ConfigurationModule.create()); // Inject non-dependency configuration diff --git a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpModule.java b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpModule.java index 943a57e1a..6aab7c6ca 100644 --- a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpModule.java +++ b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpModule.java @@ -41,6 +41,7 @@ public final class BgpModule extends PrivateModule { static final String HONEYCOMB_BGP = "honeycomb-bgp"; + @Override protected void configure() { LOG.debug("Initializing BgpModule"); // Create BGPDispatcher BGPDispatcher for creating BGP clients diff --git a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpReadersModule.java b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpReadersModule.java index 1dc1359c7..5caf315b8 100644 --- a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpReadersModule.java +++ b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpReadersModule.java @@ -26,6 +26,7 @@ import org.slf4j.LoggerFactory; public final class BgpReadersModule extends AbstractModule { private static final Logger LOG = LoggerFactory.getLogger(BgpReadersModule.class); + @Override protected void configure() { LOG.debug("Initializing BgpReadersModule"); // This should be part of BgpModule, but that one is Private and Multibinders + private BASE_MODULES diff --git a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpWritersModule.java b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpWritersModule.java index fca58b6f2..8a9062949 100644 --- a/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpWritersModule.java +++ b/infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpWritersModule.java @@ -34,6 +34,7 @@ import org.slf4j.LoggerFactory; public final class BgpWritersModule extends AbstractModule { private static final Logger LOG = LoggerFactory.getLogger(BgpWritersModule.class); + @Override protected void configure() { LOG.debug("Initializing BgpWritersModule"); // This should be part of BgpModule, but that one is Private and Multibinders + private BASE_MODULES diff --git a/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfReadersModule.java b/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfReadersModule.java index 88d7a1c02..377ce6e3c 100644 --- a/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfReadersModule.java +++ b/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfReadersModule.java @@ -32,6 +32,7 @@ public class NetconfReadersModule extends NorthboundAbstractModule> this.delegate = reader; } + @Override public ListReader getDelegate() { return delegate; } 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 513639610..a0cee9295 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 @@ -36,23 +36,27 @@ public interface DelegatingReader> ex Reader getDelegate(); + @Override @Nonnull default Optional read(@Nonnull final InstanceIdentifier id, @Nonnull final ReadContext ctx) throws ReadFailedException { return getDelegate().read(id, ctx); } + @Override default void readCurrentAttributes(@Nonnull final InstanceIdentifier id, - @Nonnull final B builder, - @Nonnull final ReadContext ctx) throws ReadFailedException { + @Nonnull final B builder, + @Nonnull final ReadContext ctx) throws ReadFailedException { getDelegate().readCurrentAttributes(id, builder, ctx); } + @Override @Nonnull default B getBuilder(final InstanceIdentifier id) { return getDelegate().getBuilder(id); } + @Override default void merge(@Nonnull final Builder parentBuilder, @Nonnull final D readValue) { getDelegate().merge(parentBuilder, readValue); @@ -63,6 +67,7 @@ public interface DelegatingReader> ex return getDelegate().isPresent(id, built, ctx); } + @Override @Nonnull default InstanceIdentifier getManagedDataObjectType() { return getDelegate().getManagedDataObjectType(); @@ -74,6 +79,7 @@ public interface DelegatingReader> ex interface DelegatingListReader, K extends Identifier, B extends Builder> extends DelegatingReader, ListReader { + @Override ListReader getDelegate(); @Override diff --git a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/KeepaliveReaderWrapper.java b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/KeepaliveReaderWrapper.java index 9a695a53c..b4d8be495 100644 --- a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/KeepaliveReaderWrapper.java +++ b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/KeepaliveReaderWrapper.java @@ -122,6 +122,7 @@ public final class KeepaliveReaderWrapper void put(final InstanceIdentifier path, final T data) {} + @Override public void close() {} } -- cgit 1.2.3-korg