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

Fixup warnings

parent 08ef5f4b
...@@ -60,15 +60,20 @@ public class MetricCopyExporterTests { ...@@ -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 { ...@@ -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 { ...@@ -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>();
......
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