Fixup warnings
This commit is contained in:
parent
08ef5f4b1f
commit
590bd5c084
|
|
@ -60,15 +60,20 @@ public class MetricCopyExporterTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void counterWithGaugeWriter() {
|
public void counterWithGaugeWriter() throws Exception {
|
||||||
SimpleGaugeWriter writer = new SimpleGaugeWriter();
|
SimpleGaugeWriter writer = new SimpleGaugeWriter();
|
||||||
MetricCopyExporter exporter = new MetricCopyExporter(this.reader, writer);
|
MetricCopyExporter exporter = new MetricCopyExporter(this.reader, writer);
|
||||||
this.reader.increment(new Delta<Number>("counter.foo", 2));
|
try {
|
||||||
exporter.export();
|
this.reader.increment(new Delta<Number>("counter.foo", 2));
|
||||||
this.reader.increment(new Delta<Number>("counter.foo", 3));
|
exporter.export();
|
||||||
exporter.export();
|
this.reader.increment(new Delta<Number>("counter.foo", 3));
|
||||||
exporter.flush();
|
exporter.export();
|
||||||
assertThat(writer.getValue().getValue()).isEqualTo(5L);
|
exporter.flush();
|
||||||
|
assertThat(writer.getValue().getValue()).isEqualTo(5L);
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
exporter.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ public abstract class AbstractViewResolverProperties {
|
||||||
}
|
}
|
||||||
|
|
||||||
public MimeType getContentType() {
|
public MimeType getContentType() {
|
||||||
if (this.contentType.getCharSet() == null) {
|
if (this.contentType.getCharset() == null) {
|
||||||
Map<String, String> parameters = new LinkedHashMap<String, String>();
|
Map<String, String> parameters = new LinkedHashMap<String, String>();
|
||||||
parameters.put("charset", this.charset.name());
|
parameters.put("charset", this.charset.name());
|
||||||
parameters.putAll(this.contentType.getParameters());
|
parameters.putAll(this.contentType.getParameters());
|
||||||
|
|
|
||||||
|
|
@ -253,7 +253,7 @@ public class ThymeleafAutoConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String appendCharset(MimeType type, String charset) {
|
private String appendCharset(MimeType type, String charset) {
|
||||||
if (type.getCharSet() != null) {
|
if (type.getCharset() != null) {
|
||||||
return type.toString();
|
return type.toString();
|
||||||
}
|
}
|
||||||
LinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();
|
LinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue