Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.

Commit 6b1247d

Browse files
committed
minor cleanup wrt #97
1 parent 475246e commit 6b1247d

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

src/main/java/com/fasterxml/jackson/dataformat/csv/CsvSchema.java

+12-16
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,18 @@
4444
* this String value will be used instead.<br />
4545
* With 2.6, value will also be recognized during value reads.
4646
* </li>
47+
* <li>strictHeaders (boolean) [default: false] (added in Jackson 2.7): whether names of
48+
* columns defined in the schema MUST match with actual declaration from
49+
* the header row (if header row handling enabled): if true, they must be and
50+
* an exception if thrown if order differs: if false, no verification is performed.
51+
* </li>
4752
* </ul>
4853
*<p>
4954
* Note that schemas without any columns are legal, but if no columns
5055
* are added, behavior of parser/generator is usually different and
5156
* content will be exposed as logical Arrays instead of Objects.
5257
*<p>
58+
*
5359
* There are 4 ways to create <code>CsvSchema</code> instances:
5460
*<ul>
5561
* <li>Manually build one, using {@link Builder}
@@ -131,8 +137,10 @@ public class CsvSchema
131137
/**
132138
* By default we do NOT expect the first line to be header.
133139
*/
140+
@Deprecated // since 2.7
134141
public final static boolean DEFAULT_USE_HEADER = false;
135142

143+
@Deprecated // since 2.7
136144
public final static boolean DEFAULT_SKIP_FIRST_DATA_ROW = false;
137145

138146
/*
@@ -474,12 +482,12 @@ public Builder setReorderColumns(boolean b) {
474482

475483

476484
/**
477-
* Use in combination with setUseHeader. When use header flag is
485+
* Use in combination with {@link #setUseHeader}. When use header flag is
478486
* is set, this setting will ensure the headers are in the order
479-
* of the schema
487+
* of the schema; if order differs, an exception is thrown.
480488
*
481-
* @param b Enable / Disable this setting
482-
* @return This Builder instance
489+
* @param b Enable / Disable this setting
490+
* @return This Builder instance
483491
*
484492
* @since 2.7
485493
*/
@@ -649,18 +657,6 @@ protected void _checkIndex(int index) {
649657
protected final char[] _nullValue;
650658

651659
protected transient String _nullValueAsString;
652-
653-
@Deprecated // in 2.5; remove from 2.6
654-
public CsvSchema(Column[] columns,
655-
boolean useHeader, boolean skipFirstDataRow,
656-
char columnSeparator, int quoteChar, int escapeChar,
657-
char[] lineSeparator)
658-
{
659-
this(columns,
660-
(useHeader ? ENCODING_FEATURE_USE_HEADER : 0) + (skipFirstDataRow ? ENCODING_FEATURE_SKIP_FIRST_DATA_ROW : 0),
661-
columnSeparator, quoteChar, escapeChar, lineSeparator,
662-
DEFAULT_ARRAY_ELEMENT_SEPARATOR, DEFAULT_NULL_VALUE);
663-
}
664660

665661
/**
666662
* @since 2.5

0 commit comments

Comments
 (0)