Skip to content

Releases: uniVocity/univocity-parsers

Next maintenance release 2.9.1

18 Jan 04:24
Compare
Choose a tag to compare

BUGs fixed

  • Quote escape configured to double quote (quote value) character if escape not detected #414

  • Delimiter detection returns first candidate delimiter even if it does not exist in the file #415

  • context.getSelectedHeaders() in RowProcessor processStarted() can return invalid results #416

  • DefaultNullRead of @parsed does not work with enums #427

  • Missing fields not initialized if nested beans present #432

  • Possible race condition #424

  • implicit limitation on max column name length? #438

Enhancements

  • Delimiter detection returns first candidate delimiter even if it does not exist in the file #415

  • Custom CsvFormatDetector #434

  • Detects "whitespace" as delimiter instead of "comma" #420

New minor release 2.9.0

15 Aug 07:52
Compare
Choose a tag to compare

BUGs fixed

  • CSV auto-detection assigning line ending as quote escape (#409)

  • FixedWidthFields.keepPadding not working (#405)

  • Multi-char delimiter incorrectly detected inside quoted string (#404)

  • Fixed the repeatable conversions initialization in the DefaultConversionProcessor (#399)

  • Fix NPE in EnumConversion (#391)

  • fixed quoted parser when using non-printable char as delimiter (#378)

Enhancements

  • make the maxRowSample for parameter public configurable for CSV auto-detection (#408)

  • settings.excludeFields() doesn't throw errors for a non-existing fields anymore. (#383)

  • Expose InputAnalysisProcess implementations publicly (#381)

  • add "com.googlecode.openbeans" as an optional OSGi dependency (#411)

Maintenance version 2.8.4

09 Dec 05:45
Compare
Choose a tag to compare

BUGS FIXED:

  • Value which contains line separator is NOT enclosed in quotes if line separator is 2 characters (#357)

  • Headers in Record context are changed if parser instance is reused (#350)

  • Record.getString(column) fails if type of column is declared as int and content in file is null (#355)

ENHANCEMENTS:

  • Rows starting with comment char should be automatically quoted (#362)

Maintenance version 2.8.3

08 Aug 04:54
Compare
Choose a tag to compare

BUGS:

  • #345 parseLine() is throwing ClassCastException when using lookahead

  • #337 Inconsistent parsing behavior when max. characters per column is set to -1 (unlimited)

  • #343 FixedWidthParser drops first char of next record if last field of current record is empty

  • #336 Single column, empty row CSV files result in empty rows and truncation of the last row

  • #328 Auto detect format with upper and lower thom is not working

  • fixed issue writing rows with selection of fields where the number of columns is larger than the selected/available fields.

ENHANCEMENTS:

  • On CSV format auto-detection, use order of allowed delimiters as order of preference

  • Performance improvement parsing values when maxCharsPerColumn = -1 (i.e. unlimited)

  • added support for writing instances of Record directly.

Maintenance release 2.8.2 to fix memory leak and some other bugs

14 May 20:24
Compare
Choose a tag to compare

BUGS:

  • Headers being extracted when not expected, and this is leading to memory leak #326

  • Unclear iteractions between iterate() methods and context/header parsing #314

  • containsColumn throws ArrayIndexOutOfBoundsException, in combination with selectFields #316

  • The result of the method getRecordNumber in TextParsingException is wrong. #324

ENHANCEMENTS:

  • On CSV format auto-detection, resolve space as column separator #310

  • Updated default excel serialization settings to ALWAYS escape either \r or \n as \r\n. #315

Maintenance release 2.8.1 to fix regression

06 Feb 07:33
Compare
Choose a tag to compare

This release fixes bug reported in issue #309 - headers parsed from one input are used again when another input is parsed using the same parser instance.

Next minor release before we move on to version 3.0.0 with JDK 8

01 Feb 03:48
Compare
Choose a tag to compare

Enhancements:

  • Map column name to attribute #287: This is a big change. Basically you can now skip annotations altogether and manually define mappings from parsed columns to an object, including nested attributes.

Now you can call getColumnMapper() from:

  1. any *Routines class
  2. any *Bean*Processor class (including BeanWriterProcessor) for writing
    mapper.attributeToIndex("name", 0); //name goes to the first column
    mapper.attributeToColumnName("name", "client_name"); .// same thing, but the first column has header "client_name"

Nested classes are also supported, you can do stuff such as the following, where name is buried in an object structure (assume a class Purchase with a Buyer attribute, which in turn has a Contact attribute, where the name is located:

    mapper.methodToIndex("buyer.contact.name", 0); 
   
    // use methods too. This assumes Contact has a `fullName(java.lang.String)` setter method:
    mapper.methodToColumnName("buyer.contact.fullName", String.class, "client_name");

    // this maps getter and setter methods named `fullName` to column `client_name`. The getters or setters are used depending if you are writing to a file or reading from it.
    mapper.methodToColumnName("buyer.contact.fullName", "client_name");

You can also just give it a map:

    Map<String, Integer> mappings = new HashMap<String, Integer>();
    ... fill your map
    mapper.attributesToIndexes(mappings);

Contrived unit tests: https://github.com/uniVocity/univocity-parsers/blob/master/src/test/java/com/univocity/parsers/issues/github/Github_287.java

Other enhancements:

  • Support CSV delimiters of more than one character #209: instead of using one character, delimiters now can be anything (e.g: ##, :-p etc).

  • Support creation of immutable objects #280: create instances of java beans with private constructors and no setter methods.

  • Enable case-sensitive column header matching #283: You can now target files with columns such as 'A', 'a', ' A ' and ' a '. Any existing code should not be affected. For example: if you use parserSettings.selectFields("a") and the parsed header is ' A ', then ' A ' will be selected as usual. This update allows one to use parserSettings.selectFields(" A ", "a") when headers such as ' A ' and 'a' are present (you can go wild here and target many different columns named aaa with different number of surrounding spaces or different character case combinations).

  • CsvParser beginParsing closes the stream #303: Introduced flag to prevent the parser from automatically closing the input: parserSettings.setAutoClosingEnabled(false)

  • Add option on FixedWidthParserSettings to keep padding of parsed values #276: the @FixedWidth annotation now has a keepPading property. This can also be set on the FixedWidthFields, using methods keepPadingOn(columns) and stripPaddingFrom(columns).

  • Introduce UnescapedQuoteHandling.BACK_TO_DELIMITER #259: if an unescaped quote is detected, the parser will re-process the parsed value and split the unescaped value into individual values after each delimiter found.

Bugfixes:

  • An extra row with null returned #306

  • Cannot determine column separator #305

  • Wrong line ending detection when normalizeLineEndingsWithinQuotes = false #299

  • Column selection makes @Validate annotation misbehave #296

  • Fixed width parsing with look-ahead and non-contiguous field definitions #294

  • CsvParser.parse ignores headers parser setting in processStarted Processor's method #289

v2.7.6

25 Sep 06:25
Compare
Choose a tag to compare

Enhancements:

  • allowing users to subclass ValidatedConversion
  • better handling of InvocationTargetExceptions when dealing with errors thrown from getters/setters

Bugfixes:

  • custom validations weren't working when writing
  • CSV autodetection failed in some cases (issue #272)

Next version 2.7.3

02 Aug 07:58
Compare
Choose a tag to compare

Enhancements:

  • Performance improvements skipping values of de-selected fields with the CSV parser.

  • Adding support for regex validation and custom validations on class attributes and methods annotated with @Validate

Bugfixes:

  • CsvRoutines.getInputDimension() returns one row less rowCount regardless of csvParserSettings.setHeaderExtractionEnabled() #262

  • record.toFieldMap() not working on FixedWidth #258

Maintenance version 2.7.2 with bugfixes

20 Jul 00:20
Compare
Choose a tag to compare

Bugfixes:

  • Problems when using two BeanProcessors with an InputValueSwitch #256

  • Column names in the header row get printed in wrong order despite index values being set correctly #255

  • Inconsistent result of parseLine on empty set of selected indexes #250