summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-11-22 11:17:15 +0100
committerMarek Gradzki <mgradzki@cisco.com>2017-11-22 11:17:17 +0100
commit0827063002d7fc50b787f1e5f6bbbbdc09802787 (patch)
treed3eb2daea6d3ef1491c8f6be88c7b20cdad8f30d
parent564ba4dc10dcde369ee4f76055c1bd8ab6cfbad9 (diff)
Add missing @Override annotations
Fix isses reported by Sonar thanks to IntelliJ's code inspection. Change-Id: Ief7b4307d4b90e107f010d7feaa307776afaf947 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/cfgattrs/CfgAttrsModule.java1
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/ConfigAndOperationalPipelineModule.java1
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.java3
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMDataBrokerProvider.java1
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/PersistingDataTreeProvider.java7
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/context/HoneycombContextDOMDataBrokerProvider.java1
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/initializer/InitializerPipelineModule.java1
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaModule.java1
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaServiceProvider.java3
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/YangBindingProviderModule.java1
-rw-r--r--infra/northbound/bgp-extensions/extension-common/src/main/java/io/fd/honeycomb/northbound/bgp/extension/CommonBgpExtensionsModule.java1
-rw-r--r--infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpConfigurationModule.java1
-rw-r--r--infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpModule.java1
-rw-r--r--infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpReadersModule.java1
-rw-r--r--infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpWritersModule.java1
-rw-r--r--infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfReadersModule.java1
-rw-r--r--infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/CompositeReader.java1
-rw-r--r--infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/DelegatingReader.java10
-rw-r--r--infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/KeepaliveReaderWrapper.java1
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<DataTree> {
@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<DataTree> {
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<DataTree> {
}
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<DOMDataB
@Inject(optional = true)
private ReadableDataManager readDataManager;
+ @Override
protected DataBroker create() {
return readDataManager != null
? DataBroker.create(modDataManager, readDataManager)
diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/PersistingDataTreeProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/PersistingDataTreeProvider.java
index 4e940d623..9da3a000b 100644
--- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/PersistingDataTreeProvider.java
+++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/PersistingDataTreeProvider.java
@@ -34,6 +34,7 @@ public abstract class PersistingDataTreeProvider extends ProviderTrait<DataTree>
@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<DataTree>
@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<DataTree>
@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<D
@Inject
private ModifiableDataManager modDataManager;
+ @Override
public DataBroker create() {
return DataBroker.create(modDataManager);
}
diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/initializer/InitializerPipelineModule.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/initializer/InitializerPipelineModule.java
index e0c38f38b..0ddcf2e76 100644
--- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/initializer/InitializerPipelineModule.java
+++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/initializer/InitializerPipelineModule.java
@@ -30,6 +30,7 @@ public final class InitializerPipelineModule extends PrivateModule {
public static final String HONEYCOMB_INITIALIZER = "honeycomb-initializer";
+ @Override
protected void configure() {
// Create data tree manager on top of non-persisting config data tree
bind(ModifiableDataManager.class).toProvider(ModifiableDTDelegInitProvider.class).in(Singleton.class);
diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaModule.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaModule.java
index c84724f5d..7e6b89df7 100644
--- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaModule.java
+++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaModule.java
@@ -24,6 +24,7 @@ import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext;
public class SchemaModule extends AbstractModule {
+ @Override
protected void configure() {
bind(ModuleInfoBackedContext.class).toProvider(ModuleInfoBackedCtxProvider.class).in(Singleton.class);
bind(SchemaService.class).toProvider(SchemaServiceProvider.class).in(Singleton.class);
diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaServiceProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaServiceProvider.java
index ec4a303d6..4ed3698ec 100644
--- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaServiceProvider.java
+++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/schema/SchemaServiceProvider.java
@@ -30,6 +30,7 @@ public final class SchemaServiceProvider extends ProviderTrait<SchemaService> {
@Inject
private ModuleInfoBackedContext mibCtx;
+ @Override
public StaticSchemaService create() {
return new StaticSchemaService(mibCtx.getSchemaContext());
}
@@ -69,8 +70,10 @@ public final class SchemaServiceProvider extends ProviderTrait<SchemaService> {
final SchemaContextListener listener) {
listener.onGlobalContextUpdated(schemaContext);
return new ListenerRegistration<SchemaContextListener>() {
+ @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<NetconfConfig
super(new NetconfConfigurationModule(), NetconfConfiguration.class);
}
+ @Override
protected void configure() {
if (!getConfiguration().isNetconfEnabled()) {
LOG.debug("NETCONF Northbound disabled, skipping readers initialization");
diff --git a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/CompositeReader.java b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/CompositeReader.java
index 2eca8954c..0a87d9b3f 100644
--- a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/CompositeReader.java
+++ b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/CompositeReader.java
@@ -187,6 +187,7 @@ class CompositeReader<D extends DataObject, B extends Builder<D>>
this.delegate = reader;
}
+ @Override
public ListReader<D, K, B> 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<D extends DataObject, B extends Builder<D>> ex
Reader<D, B> getDelegate();
+ @Override
@Nonnull
default Optional<? extends DataObject> read(@Nonnull final InstanceIdentifier<? extends DataObject> id,
@Nonnull final ReadContext ctx) throws ReadFailedException {
return getDelegate().read(id, ctx);
}
+ @Override
default void readCurrentAttributes(@Nonnull final InstanceIdentifier<D> 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<D> id) {
return getDelegate().getBuilder(id);
}
+ @Override
default void merge(@Nonnull final Builder<? extends DataObject> parentBuilder,
@Nonnull final D readValue) {
getDelegate().merge(parentBuilder, readValue);
@@ -63,6 +67,7 @@ public interface DelegatingReader<D extends DataObject, B extends Builder<D>> ex
return getDelegate().isPresent(id, built, ctx);
}
+ @Override
@Nonnull
default InstanceIdentifier<D> getManagedDataObjectType() {
return getDelegate().getManagedDataObjectType();
@@ -74,6 +79,7 @@ public interface DelegatingReader<D extends DataObject, B extends Builder<D>> ex
interface DelegatingListReader<D extends DataObject & Identifiable<K>, K extends Identifier<D>, B extends Builder<D>>
extends DelegatingReader<D, B>, ListReader<D, K, B> {
+ @Override
ListReader<D, K, B> 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<D extends DataObject, B extends Builde
@Override
public <T extends DataObject> void put(final InstanceIdentifier<T> path, final T data) {}
+ @Override
public void close() {}
}