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