Github user garydgregory commented on a diff in the pull request: https://github.com/apache/commons-imaging/pull/35#discussion_r210287038 --- Diff: src/main/java/org/apache/commons/imaging/formats/psd/PsdHeaderInfo.java --- @@ -45,9 +50,14 @@ public PsdHeaderInfo(final int version, final byte[] reserved, final int channel } public void dump() { - final PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out, Charset.defaultCharset())); - dump(pw); - pw.flush(); + try (StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw)) { --- End diff -- This seems like duplicate code from a similar block I saw above. Should it be refactored?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org