diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/ant/Formatter.java b/pmd-core/src/main/java/net/sourceforge/pmd/ant/Formatter.java index efe3dae1d3..3ba06ef0b1 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/ant/Formatter.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/ant/Formatter.java @@ -72,7 +72,7 @@ public class Formatter { if (null == s) { if (toConsole) { - if(null == System.console()) { + if (null == System.console()) { // pipe or redirect, no interactive console. s = System.getProperty("file.encoding"); } else { @@ -91,8 +91,7 @@ public class Formatter { parameter.setName("encoding"); parameter.setValue(charset.name()); parameters.add(parameter); - } - else { + } else { charset = Charset.forName(s); } }