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 ca27acd463..320c97bd1e 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 @@ -206,10 +206,10 @@ public class Formatter { try { Field f = Console.class.getDeclaredField("cs"); f.setAccessible(true); - Object res = f.get(console); - if (res instanceof Charset) { - return ((Charset) res).name(); - } + Object res = f.get(console); + if (res instanceof Charset) { + return ((Charset) res).name(); + } } catch (NoSuchFieldException e) { // fall-through } catch (IllegalAccessException e) {