summaryrefslogtreecommitdiffstats
path: root/service-monitor
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2019-02-26 10:24:25 +0100
committerJon Marius Venstad <venstad@gmail.com>2019-02-26 10:30:00 +0100
commitdaf56a4317534165b76e6c4a752b20a00ce056e2 (patch)
tree9e2ea7737042ed09a9fc92f3e968fc0def817827 /service-monitor
parent1ae68bd4ddf330b05dcf03ff864167cb81c5fe5b (diff)
Fix imports and linting
Diffstat (limited to 'service-monitor')
-rw-r--r--service-monitor/pom.xml1
-rw-r--r--service-monitor/src/main/java/com/yahoo/vespa/service/model/ServiceModelProvider.java6
2 files changed, 1 insertions, 6 deletions
diff --git a/service-monitor/pom.xml b/service-monitor/pom.xml
index c6504ff9315..0826826f433 100644
--- a/service-monitor/pom.xml
+++ b/service-monitor/pom.xml
@@ -130,6 +130,7 @@
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>-Xlint:-serial</arg>
+ <arg>-Xlint:-try</arg>
<arg>-Werror</arg>
</compilerArgs>
</configuration>
diff --git a/service-monitor/src/main/java/com/yahoo/vespa/service/model/ServiceModelProvider.java b/service-monitor/src/main/java/com/yahoo/vespa/service/model/ServiceModelProvider.java
index dbcc6ff7b9b..c6947810fa0 100644
--- a/service-monitor/src/main/java/com/yahoo/vespa/service/model/ServiceModelProvider.java
+++ b/service-monitor/src/main/java/com/yahoo/vespa/service/model/ServiceModelProvider.java
@@ -38,11 +38,6 @@ public class ServiceModelProvider implements Supplier<ServiceModel> {
@Override
public ServiceModel get() {
try (LatencyMeasurement measurement = metrics.startServiceModelSnapshotLatencyMeasurement()) {
- // Reference 'measurement' in a dummy statement, otherwise the compiler
- // complains about "auto-closeable resource is never referenced in body of
- // corresponding try statement". Why hasn't javac fixed this!?
- dummy(measurement);
-
// WARNING: The monitor manager may be out-of-sync with duper model (no locking)
List<ApplicationInfo> applicationInfos = duperModelManager.getApplicationInfos();
@@ -50,5 +45,4 @@ public class ServiceModelProvider implements Supplier<ServiceModel> {
}
}
- private void dummy(LatencyMeasurement measurement) {}
}