Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@
<message key="ws.notPreceded"
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
</module>
<!-- this doesn't seem to be compatible with google auto-format
<module name="Indentation">
<property name="basicOffset" value="2"/>
<property name="braceAdjustment" value="2"/>
Expand All @@ -264,7 +263,6 @@
<property name="lineWrappingIndentation" value="4"/>
<property name="arrayInitIndent" value="2"/>
</module>
-->
<module name="OverloadMethodsDeclarationOrder"/>
<module name="VariableDeclarationUsageDistance"/>
<module name="CustomImportOrder">
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/it-spring-boot-smoke-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.43.0</version>
<version>2.44.0</version>
<configuration>
<java>
<googleJavaFormat/>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.43.0</version>
<version>2.44.0</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static String convertUnit(Unit unit) {
return null;
}
switch (unit.toString()) {
// Time
// Time
case "days":
return "d";
case "hours":
Expand All @@ -68,7 +68,7 @@ static String convertUnit(Unit unit) {
return "us";
case "nanoseconds":
return "ns";
// Bytes
// Bytes
case "bytes":
return "By";
case "kibibytes":
Expand All @@ -87,7 +87,7 @@ static String convertUnit(Unit unit) {
return "GBy";
case "terabytes":
return "TBy";
// SI
// SI
case "meters":
return "m";
case "volts":
Expand All @@ -100,14 +100,14 @@ static String convertUnit(Unit unit) {
return "W";
case "grams":
return "g";
// Misc
// Misc
case "celsius":
return "Cel";
case "hertz":
return "Hz";
case "percent":
return "%";
// default
// default
default:
return unit.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.util.Collections;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
Expand Down Expand Up @@ -196,8 +197,9 @@ MetricSnapshot fromMeter(String dropwizardName, Meter meter) {
@Override
public MetricSnapshots collect() {
MetricSnapshots.Builder metricSnapshots = MetricSnapshots.builder();
for (@SuppressWarnings("rawtypes")
Map.Entry<MetricName, Gauge> entry : registry.getGauges(metricFilter).entrySet()) {
@SuppressWarnings("rawtypes")
Set<Map.Entry<MetricName, Gauge>> entries = registry.getGauges(metricFilter).entrySet();
for (@SuppressWarnings("rawtypes") Map.Entry<MetricName, Gauge> entry : entries) {
Optional.ofNullable(fromGauge(entry.getKey().getKey(), entry.getValue()))
.ifPresent(metricSnapshots::metricSnapshot);
}
Expand Down