Commit 590bd5c0 authored by Phillip Webb's avatar Phillip Webb

Fixup warnings

parent 08ef5f4b
......@@ -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>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment