Fixup warnings

This commit is contained in:
Phillip Webb 2016-04-28 16:50:03 -07:00
parent 08ef5f4b1f
commit 590bd5c084
3 changed files with 14 additions and 9 deletions

View File

@ -60,9 +60,10 @@ public class MetricCopyExporterTests {
}
@Test
public void counterWithGaugeWriter() {
public void counterWithGaugeWriter() throws Exception {
SimpleGaugeWriter writer = new SimpleGaugeWriter();
MetricCopyExporter exporter = new MetricCopyExporter(this.reader, writer);
try {
this.reader.increment(new Delta<Number>("counter.foo", 2));
exporter.export();
this.reader.increment(new Delta<Number>("counter.foo", 3));
@ -70,6 +71,10 @@ public class MetricCopyExporterTests {
exporter.flush();
assertThat(writer.getValue().getValue()).isEqualTo(5L);
}
finally {
exporter.close();
}
}
@Test
public void exportIncludes() {

View File

@ -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());

View File

@ -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>();