Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Commit

Permalink
fix a few compiler/Maven warnings (#231)
Browse files Browse the repository at this point in the history
* modules/protobuf: remove duplicate dependencies in pom.xml

* SemanticCoreStatistics: fix two compiler warnings

redundant cast to `long`, use of raw `Gauge` type
  • Loading branch information
mattnworb authored Jan 20, 2021
1 parent e425e90 commit 5a3f7f5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public Histogram newMetric() {

@Override
public boolean isInstance(final Metric metric) {
return Histogram.class.isInstance(metric);
return metric instanceof Histogram;
}
};

Expand Down Expand Up @@ -99,9 +99,9 @@ public OutputManagerStatistics newOutputManager() {
private final Counter metricsDroppedByCardinalityLimit =
registry.counter(m.tagged("what", "metrics-dropped-by-cardlimit", "unit", "metric"));

private final Gauge metricsCardinalityMetric =
private final Gauge<Long> metricsCardinalityMetric =
registry.register(m.tagged("what", "metrics-cardinality"),
(Gauge<Long>) () -> (long) metricsCardinality.get());
(Gauge<Long>) metricsCardinality::get);

@Override
public void reportSentMetrics(int sent) {
Expand Down
33 changes: 11 additions & 22 deletions modules/protobuf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,22 @@
<artifactId>ffwd-api</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>

<dependency>
<groupId>com.spotify.ffwd</groupId>
<artifactId>ffwd-client</artifactId>
<version>0.2.4</version>
</dependency>

<!-- testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>

<!-- testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

0 comments on commit 5a3f7f5

Please sign in to comment.