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 320c97bd1e..dbb9074148 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 @@ -78,7 +78,6 @@ public class Formatter { if (toConsole) { s = getConsoleEncoding(); if (null == s) { - // highly unlikely. s = System.getProperty("file.encoding"); } } @@ -215,8 +214,9 @@ public class Formatter { } catch (IllegalAccessException e) { // fall-through } + return getNativeConsoleEncoding(); } - return getNativeConsoleEncoding(); + return null; } private static String getNativeConsoleEncoding() {