Fix NPE when format is null.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508938 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2013-07-31 15:48:54 +00:00
parent a062477946
commit 2b14b16d4b
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ public class CSVPrinter implements Flushable, Closeable {
public CSVPrinter(final Appendable out, final CSVFormat format) {
this.out = out;
this.format = format == null ? CSVFormat.DEFAULT : format;
format.validate();
this.format.validate();
}
// ======================================================