File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
csv/src/main/java/com/fasterxml/jackson/dataformat/csv Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -509,14 +509,13 @@ public void setCodec(ObjectCodec c) {
509509 }
510510
511511 @ Override
512- public void setSchema (FormatSchema schema )
512+ public void setSchema (final FormatSchema schema )
513513 {
514514 if (schema instanceof CsvSchema ) {
515515 _schema = (CsvSchema ) schema ;
516- String str = _schema .getNullValueString ();
517- _nullValue = str ;
516+ _nullValue = _schema .getNullValueString ();
518517 } else if (schema == null ) {
519- schema = EMPTY_SCHEMA ;
518+ _schema = EMPTY_SCHEMA ;
520519 } else {
521520 super .setSchema (schema );
522521 }
@@ -931,7 +930,7 @@ protected void _readHeaderLine() throws IOException {
931930 int newColumnCount = newSchema .size ();
932931 if (newColumnCount < 2 ) { // 1 just because we may get 'empty' header name
933932 String first = (newColumnCount == 0 ) ? "" : newSchema .columnName (0 ).trim ();
934- if (first .length () == 0 ) {
933+ if (first .isEmpty () ) {
935934 _reportCsvMappingError ("Empty header line: can not bind data" );
936935 }
937936 }
@@ -1475,9 +1474,6 @@ protected boolean _isNullValue(String value) {
14751474 if (_cfgEmptyStringAsNull && value .isEmpty ()) {
14761475 return true ;
14771476 }
1478- if (_cfgEmptyUnquotedStringAsNull && value .isEmpty () && !_reader .isCurrentTokenQuoted ()) {
1479- return true ;
1480- }
1481- return false ;
1477+ return _cfgEmptyUnquotedStringAsNull && value .isEmpty () && !_reader .isCurrentTokenQuoted ();
14821478 }
14831479}
You can’t perform that action at this time.
0 commit comments