diff --git a/src/main/java/com/hivemq/extensions/aws/cloudwatch/CloudWatchReporterService.java b/src/main/java/com/hivemq/extensions/aws/cloudwatch/CloudWatchReporterService.java index a546e1f..01ee323 100755 --- a/src/main/java/com/hivemq/extensions/aws/cloudwatch/CloudWatchReporterService.java +++ b/src/main/java/com/hivemq/extensions/aws/cloudwatch/CloudWatchReporterService.java @@ -86,10 +86,10 @@ void startCloudWatchReporter( final CloudWatchReporter.Builder builder = CloudWatchReporter.forRegistry(metricRegistry, cloudWatchAsyncClient, METRIC_NAMESPACE); - if (configuration.getConfig().getZeroValuesSubmission()) { + if (cloudWatchConfig.getZeroValuesSubmission()) { builder.withZeroValuesSubmission(); } - if (configuration.getConfig().getReportRawCountValue()) { + if (cloudWatchConfig.getReportRawCountValue()) { builder.withReportRawCountValue(); } cloudWatchReporter = builder diff --git a/src/main/java/com/hivemq/extensions/aws/cloudwatch/configuration/entities/Config.java b/src/main/java/com/hivemq/extensions/aws/cloudwatch/configuration/entities/Config.java index 49bfbc9..000cca3 100755 --- a/src/main/java/com/hivemq/extensions/aws/cloudwatch/configuration/entities/Config.java +++ b/src/main/java/com/hivemq/extensions/aws/cloudwatch/configuration/entities/Config.java @@ -31,7 +31,7 @@ /** * @author Anja Helmbrecht-Schaar */ -@SuppressWarnings("FieldCanBeLocal") +@SuppressWarnings({"FieldCanBeLocal", "FieldMayBeFinal"}) @XmlRootElement(name = "cloudwatch-extension-configuration") @XmlType(propOrder = {}) @XmlAccessorType(XmlAccessType.NONE) @@ -48,13 +48,13 @@ public class Config { @XmlElementWrapper(name = "metrics") @XmlElement(name = "metric") - private final @NotNull List metrics = new ArrayList<>(); + private @NotNull List metrics = new ArrayList<>(); @XmlElement(name = "zero-values-submission", defaultValue = "false") - private final boolean zeroValuesSubmission = false; + private boolean zeroValuesSubmission = false; @XmlElement(name = "report-raw-count-value", defaultValue = "false") - private final boolean reportRawCountValue = false; + private boolean reportRawCountValue = false; @XmlElement(name = "cloudwatch-endpoint-override") private final @Nullable String cloudWatchEndpointOverride = null;