Menu

What's new

Scott Conway Andrew Rucker Jones

Not slotted/Unassigned/Open/Ideas that may possibly be rejected

  • XML configuration of bean mapping for situations when you can't or don't want to annotate beans.
  • Deprecate all occurrences of setErrorLocale() and add the error locale as an argument to the class's constructor instead. (This clearly does not apply to builder classes.)
  • More translations are always welcome.
  • Possibly modularize and reorganize the project (major release only)
    • Restructure packages
    • Protect internal classes using Java 9's module system
    • Break the project into multiple projects: core, bean logic, maybe XML configuration

Planned

Currently in trunk

  • Merge Request #36: Enhancement - add withType method to mapping strategy builders
  • Merge Request #33:
    • Replace java.text.SimpleDateFormat to org.apache.commons.lang3.time.DateFormatUtils.format to reduce instance creation
    • Add ResultSetHelper ability to CSVParserWriter when using CSVWriterBuilder
    • Configurable null default in ResultSetHelperService

Release 5.9 - 11/21/2023

  • Support request #122: support for specifying the rounding mode when formatting decimals.
  • Support request #120: trim headers when checking for required fields.

Release 5.8 - 7/23/2023

  • Bug #237: error locale not used in ConverterCurrency and ConverterEnum.
  • Fixed French translations. Thanks to Pierrick Gosset!
  • Patch request #68 - added module support to opencsv for those who compile with java versions 9 and greater. Thank you Samael for this submission.
  • Bug #241 - made several of the methods in AbstractMappingStrategy protected so they can be overridden in extending classes.
  • Bug #242 - Memory improvements in ConverterPrimitiveTypes

Release 5.7.1 - 10/22/2022

  • Corrected a couple of unit tests whose asserts were not reachable due to configuration settings and thus returning false positives.
  • Updated several of the dependencies including apache commons-text.

Release 5.7.0 - 9/4/2022

  • Patch #64: AbstractMappingStrategy.getColumnName() is now protected.
  • Bug #233: keepCarriageReturn in the CSVReader is only supposed to keep carriage returns in the data, but was keeping the last carriage return on the last element when using systems that used carriage returns.
  • Bug #232: Updated asciidocs code examples.

Release 5.6 - 2/21/2022

  • Merge request #29-31: Addition of optional number formatters to ResultSetHelperService. Thank you Ivan Lorca!

Release 5.5.2 - 9/4/2021

  • Patch #63: Escaping the very first character on a line was parsed incorrectly by CSVParser.
  • Fixed fluent API of CSVReaderHeaderAwareBuilder to return the correct type.
  • A RowProcessor passed to CSVReaderHeaderAwareBuilder was not passed to the constructor of CSVReaderHeaderAware and thus not used.
  • Internationalized an error text hard coded in English.

Release 5.5.1 - 7/19/2021

  • Bug #225: Constructors in HeaderNameBaseMappingStrategy should be public.

Release 5.5 - 7/5/2021

  • Feature request #143: Added entry in maven-jar-plugin to generate a automatic module name entry in the MANIFEST.MF file for those who want to compile opencsv themselves with a java version > 8.
  • Bug #220: Fixed a NullPointerException when empty fields are converted to null and a full line is empty in the input.
  • Fixed a problem similar to Patch #61: The library would hang if writing a single bean that contained multiple errors using StatefulBeanToCsv.
  • If the header name mapping strategy was implied (that is, no binding annotations), writing a bean would also write fields annotated with CsvRecurse as if they were fields and not classes to be recursed into.
  • Bug #223 (which was not a bug): Added an option to disable length checking on reading records using a header-name-based mapping strategy.
  • Added builders for all mapping strategies. This allows us to add parameters to constructors for new features without harming backward compatibility. If you instantiate mapping strategies, you are highly encouraged to use the builders from now on.

Release 5.4 - 3/14/2021

HAPPY PI DAY!!!

  • Bug #215 - fixed issue in ResultSetColumnNameHelperService where if a Date or DateTime format was set it was not used.
  • Moved some of the existing StringProcessors created for Unit and Integration tests into src for consumption by developers. These are in the com.opencsv.bean.processor package and you can read more about them in the javadocs when 5.4 is pushed out.
  • Feature request #143: Support java.util.UUID
  • Feature request #145: Made the handle methods in ResultSetHelperService protected instead of private to make it easier to allow people to create their own service by extending and overriding the parts they desire.
  • Feature request #140: Introduction of profiles, which allow selective application of annotations, as well as multiple annotations of the same type. This allows you to use the same data bean for multiple different inputs that have essentially the same data formatted differently.
  • Added a converter to/from boolean/French.
  • Added a base class for all boolean to natural language conversion. With this base class, converters for other languages are simple.
  • Patch #61: Multiple errors per line would block the Iterator returned by CsvToBean.iterator().

Release 5.3 - 10/25/2020

  • Feature request #135: Slight changes to access modifiers in AbstractMappingStrategy to make it more extensible.
  • Feature request #132: Automatic conversion to and from java.util.Currency. Thanks to Andrew Munn!
  • Support request #84: If multiple errors are present in a line (on reading) or a bean (on writing) and the exception handling behavior is collecting exceptions, all errors will now generate an exception.
  • Bug #214: A NullPointerException was generated if a header field was empty and CSVReaderNullFieldIndicator.EMPTY_SEPARATORS was used. Now there is no exception, but the results of input like this are not documented or considered stable. Garbage in, garbage out.

Release 5.2 - 5/16/2020

  • Better support for streams while reading. Previously, even if CsvToBean.stream() was used, opencsv processed all of the input and created all beans before passing them downstream to whatever was waiting for the stream. Now beans are pulled off the assembly line as they are finished and passed to the next station in the stream. This should increase efficiency of CPU usage slightly as user code can continue to process while beans are still being created, and it should also lower memory usage if the beans are thrown away immediately following processing.
  • Feature request #122: It is now possible to define arbitrary behavior for error handling while creating beans (on reading) or output strings (on writing). For more information, please read the Javadoc for CsvExceptionHandler.
  • Bug #207: Validators were not run for the first line of data when using a position-based mapping strategy.
  • Bug #209: CSVReaderHeaderAware.readMap() could not take null values, which happened when using CSVReaderNullFieldIndicator.EMPTY_SEPARATORS.
  • Feature request #124: More detailed error message from CSVReaderHeaderAware upon encountering an unexpected number of headers. Thanks to Andrew M for the patch!
  • Feature request #126: Automatic conversion of enumeration types is now possible. Conversion on reading is case-insensitive. In addition, EnumSet is now supported as a collection type for the "splitting" annotations, and is the default implementation if a variable is declared as only a Set and the element type is an enumeration type. This is all in the interest of slightly increased performance for enumeration types.
  • Bug #212: Escaped separators were still treated as separators.
  • Merge Request #26 - memory optimization when there are no validators. Thanks to Zack Young!

Release 5.1 - 2/2/2020

  • Support request #73 - Bean fields wrapped in Optional are now supported.
  • Bug #203 - Using CSVNullFieldIndicator != NEITHER caused a NullPointerException with splitting (by annotation) or non-empty capture groups (in annotations).
  • Bug #206 - Added MalformedInputException as a passthrough exception in CSVReader.
  • Updated Asciidocs to show java 8 as minimum java version.
  • Fixed image path issue in the asciidocs.
  • Feature Request #121 - merged patch from Anton Romanov to have the CSVParserWriter use the CSVReaderNullFieldIndicator.
  • Merge from Kevin Kussmaul for Feature Request #117 CSVWriter modified to enable the user to handle exceptions. Warning note on this - you will need to use an Writer that does not hide the exception (PrintWriter catches all exceptions and silently handles them).
  • Feature Request #120 - Added withIgnoreEmptyLines to CsvToBeanBuilder so that blank lines will not create empty/default objects potentially causing validation errors.
  • Undeprecated the CsvToBeanFilter - when we created the BeanVerifier we thought that it could do everything that the CsvToBeanFilter could do and then some because you could check specific fields in the object itself which would be impossible if you did not know the column the data was in. However feature request #120 made us realize that there are times you want to check the raw data and even though we now have functionality for empty line checks we could be missing something else, so we are keeping the CsvToBeanFilter. But that said we recommend you use the BeanVerifier where possible.

Release 5.0 - 10/19/2019

  • Line and Row and Bean field validation for CSVReader - for feature request #93
  • Row and Bean field processing for CSVReader - for feature request #107 & #108
  • Stream support as an output from CsvToBean and as an input to StatefulBeanToCsv.
  • Full support for the Java 8 Time API.
  • The locale used for conversion on writing can now be separated from the locale used for conversion on reading.
  • CsvDate and CsvNumber can also take differing format strings for reading and writing.
  • A new mapping strategy (FuzzyMappingStrategy) has been added to remove the need to annotate fields in simple cases of field names not exactly matching header names.
  • Support Request #64 - A new annotation (CsvRecurse) has been added to make it easier to split CSV inputs or outputs across layered bean types.
  • Patch #57 - On writing, any field named "serialVersionUID" will be ignored, provided the bean being written implements java.io.Serializable.
  • Patch #57 - Individual fields can be ignored on processing. Use either the annotation CsvIgnore or one of the withIgnoreField() methods in the builders.
  • Bug #199 - Fields annotated with CsvNumber would cause a NullPointerException if the input was empty.
  • Performance enhancements - At the start of 5.0 we created a csvPerformance app on github to run different configurations with random data. With that we were able to easily run several performance tests with JProfiler to find and remove several bottlenecks. Afterwards we are seeing around 15-45% improvement in reading and writing using annotated beans and 100-285% improvement with POJOs! Where annotated beans were always quicker before the two are now near parity.
  • With much thanks to Benoît Coutine, we now have a French translation of all error messages!

Release 4.6 - 4/28/2019

  • Bug #194 - Parsing error gives the wrong line number and content in CsvToBean.
  • Bug #195 - resolve dependency conflicts.
  • Patch #55 - added write(Iterator< T >) method to StatefulBeanToCSV.
  • Fixed asciidocs formatting issue in Annotations section.
  • Bug #192 - NullPointerException when input is empty and ColumnPositionMappingStrategy is used.

Release 4.5 - 2/9/2019

  • Feature Request #102 - Allow prebuilt CSVReader (with prebuilt parser) to be injected into CsvToBeanBuilder via constructor.
  • Bug #191 - corrected code in asciidocs.
  • Bug #193 - fixed issue where RFC4180Parser fails when multiline field is processed and a quote is at the end of a line but not end of a field.
  • Merge Request - Merge from Edgar Silva adds a CsvMultilineLimitBrokenException, that extends the current IOException to be backwards compatible,that will contain the row number and context information when the multi line limit is broken.

Release 4.4 - 11/17/2018

  • Support request #60, feature request #97 - We have introduced a new way to filter beans with BeanVerifier.
  • Bug #184 - Bad links in the opencsv.sourceforge.net page. Issue because of Twiki Words in the index.twiki. Have converted documentation to asciidocs for better control and now have a true table of contents.
  • Feature request #100 - The offending line of input is now included in most exceptions derived from CsvException, if the input is the reason for the exception.

Release 4.3.2 - 10/14/2018

  • Bug 174 (again) - The error message for parsing errors that are not saved with .throwExceptions(false) included the wrong line number and input text.
  • Bug 182 - CSVIterator swallows the IOException thrown if the multi-line limit is reached.
  • Bug 176 - Allow certain child classes of IOException to be thrown from the CSVReader::isClosed method.

Release 4.3.1 - 10/8/2018

  • Missed pt-BR translations slated for 4.3 release.
  • Updated dependencies for 4.4 release.

Release 4.3 - 10/6/2018

  • Fix for a NullPointerException when using a ResultSet that returns a BigInteger that is NULL.
  • Bug 177 - No null check on writing CSV files using the CsvNumber annotation.
  • Bug 174 - The line number reported in exceptions thrown was actually a record number. That is wrong from the perspective of the expectation based on the variable name (lineNumber), but it is also very unhelpful from the perspective of debugging, when the true line number from the file is necessary to find bad data.
  • Bug 179 (sort of) - When using HeaderColumnNameTranslateMappingStrategy, if the target bean was annotated with the opencsv annotations, the mapping did not work at all. Now the annotations are ignored, as documented and expected.
  • Support request 55 - Custom converters can now be used with one-to-many and many-to-one conversions (split and join). They are not the same as free-standing custom converters, though, so be sure to read the documentation.
  • Addition of "capture" and "format" to the annotations to allow selective conversion of field contents on reading and formatting on writing.
  • Bug 180 - Explicit English translations of error files.
  • Feature Request 94 - Added a setColumnOrderOnWrite() method to both main mapping strategies to allow for arbitrary column ordering on writing.

Release 4.2 - 6/2/2018

  • Finished ParseToLine functionality (reverse parse). Now there is a new CSVParserWriter class that you can build with either the CSVParser or the RFC4180Parser so now the same class that reads the CSV will write it as well. You can look at the CSVParserWriterSpec to see it in action.
  • Bug 162 - The error message for missing required headers has been extended to include the list of headers actually found.
  • Merge Request #10 - merged in code from André Levandovski Rosot that adds a CSVReaderHeaderAware. A child class of CSVReader that allows you to read an individual field by header name or get a map of header, value string for a record instead of a list of strings.
  • Support for collections (Feature Request 87) - For those of you who know and use ConvertSplitOnWhitespace, this is a natural extension to that idea. It allows you developers out there to define one field of a CSV file as being a collection of elements that are themselves separated by some string. Simply annotate a field with a type implementing java.util.Collection in your bean and you're pretty much done. See the site Wiki and/or the Javadoc for details.
  • Support Request 53 - When the SQL type of a column of a result set is unknown, use Objects.toString() on it instead of returning an empty string.
  • Bug #164 - Correct issues in the example code in the documentation.
  • Bug #165 - Fix issue where RFC4180Parser returns incorrect results if the last field is a quoted newline.
  • Support for combining many input fields into one bean field and vice versa on writing (Feature Request #90). Using new annotations you can ask opencsv to take multiple fields from the input and put them into a MultiValuedMap (from Apache Commons Collections) that can then be easily accessed as a Collection with a simple call to values(). Writing is more of a pain, but it still works.
  • Another round of applause goes to André Levandovski Rosot for contributing a translation of the opencsv error messages into Brazilian Portuguese. His hard work and self-sacrifice increased the number of languages we supply by a full 50%!
  • Bug #167 - StatefulBeanToCsv now has a withApplyQuotesToAll() method.
  • Bug #168 - Fields in base classes were ignored if using the ColumnPositionMappingStrategy.
  • Feature Request #95 - Introduced the optional annotation CsvNumber to provide more flexibility when reading and writing formatted numbers.
  • For those who use our annotations to populate beans, I have good news: I fixed poor programming of my own and sped up bean population by a whopping 93.5%.
  • Bug #172 - The BIGINT type didn't work when using an SQL result set that really had an integer longer than a long could hold.

Release 4.1 - 11/13/2017

  • Made all exceptions serializable. Some members unfortunately have to be transient for that to be possible. The getters are appropriately documented.
  • Fixed a NullPointerException for the rare case that the input is empty, the HeaderColumnNameMappingStrategy is being used, and the bean to be populated has required fields.
  • An IOException is now thrown if a multiline field fails to terminate before the end of the input. Included in the message for the IOException is the beginning of the unfinished text to make searching for errors in large input files simpler.
  • Bug 151 - cast Iterator in CsvToBean to T
  • Bug 154 - fixed issue where linesProcessed was not being updated in the CSVToBean when using iterator.
  • Bug 158 - CsvToBean will respect the value of the CSVReaderNullFieldIndicator in the parser.
  • Bug 155 - In the HeaderColumnNameMappingStrategy thrown an exception if the number of data items is different than the number of items in the header.

Release 4.0 - 8/12/2017

  • Java 7 is now the minimum supported version. We strongly encourage everyone using Java 7 to use the latest Java 7, because with an older Java 7 we ran into performance problems under certain circumstances.
  • Feature Request #86 - modify the build method of CsvToBeanBuilder to return the CSVToBean cast to the type of the Bean.
  • We have rewritten the bean code to be multi-threaded so that reading from an input directly into beans is significantly faster. Performance benefits depend largely on your data and hardware, but our non-rigorous tests indicate that reading now takes a third of the time it used to.
  • We have rewritten the bean code to be multi-threaded so that writing from a list of beans is significantly faster. Performance benefits depend largely on your data and hardware, but our non-rigorous tests indicate that writing now takes half of the time it used to.
  • There is a new iterator available for iterating through the input into beans. This iterator is consistent in every way with the behavior of the code that reads all data sets at once into a list of beans. The old iterator did not support all features, like locales and custom converters, and is now deprecated.
  • opencsv now supports internationalization for all error messages it produces. The easiest way to benefit from this is to make certain the default locale is the one you want. Otherwise, look for the withErrorLocale() and setErrorLocale() methods in various classes. Localizations are provided for American English and German. Further submissions are welcome, but with a submission you enter into a life-long contract to provide updates for any new messages for the language(s) you submit. If you break this contract, you forefit your soul.
  • Support for national character sets was added to ResultSetHelperService (NClob, NVarchar, NChar, LongNVarchar).
  • Everything previously deprecated has been removed
  • We have deprecated many unnecessary constructors and methods to do the same thing with various partial argument lists. Please use the builders we provide.
  • We have deprecated MappingStrategy.findDescriptor() because we plan to move completely to reflection in version 5.0

Release 3.10 - 7/1/2017

  • Bug #136 - Newline character not correctly escaped when using no quote character
  • Bug #145 - CsvBindByName did not work when the column names and field names did not match
  • Patch #54 - Upper limit for number of lines in a multiline record
  • Patch #53 - CSVParser improvements
  • Bug #141 - fixed issue with blank dates
  • Bug #142 - StatefulBeanToCsv.beforeFirstWrite was being called for every bean.
  • Bug #139 - Missing required fields not giving exceptions in certain situations

Release 3.9 - 1/30/2017

BIG NEWS - RFC4180Parser is ready!

  • Bug #126 - Single " in line results in different reading to excel/open office. I believe this will be fixed by #125.
  • Bug #125 - really a half bug / half feature request. Jaakov has come across an csv string produced by Excel (that is also RFC-4180 compliant scarily enough) that I cannot configure the CSVParser to read. So for the next release my goal is to break the CSVParser into CSVParser and AbstractCSVParser (along with a ICSVParser interface) and once that is done create an ExcelCSVParser that will handle this string and aimed toward the rules in the RFC-4180 document. Once this is done I can modify the CSVReader to take the ICSVParser instead of the CSVParser and the CSVParserBuilder will spit out either Parser depending on a new method (TBD). This way all current users will be unaffected by the change and users wanting RFC compliance can use the builder to create the correct parser - win/win.
  • Feature Request #78 - Add a method to BeanToCSV to allow a single record passed in. There was no easy way to determine if the header has been written so it will be up to the user calling the method to pass a boolean value to write the header or not.
  • Bug #133 - fixed issue where empty fields was causing a null pointer exception in AbstractCSVToBean.
  • Initial checkin of code for Bug 125,126.
  • Bug #135 - AbstractConverter not correctly handling empty String when converting to Date.
  • Feature Request #75 - Create a DefaultMappingStrategy.
  • Feature Request #81 - Modify load fields to handle annotations from a superclass.

Release 3.8 - 6/5/2016

  • Bug request #127 - see if I can upload 3.8 (and set previous versions uploaded to nexus) as both a bundle and a jar. Failing that I need to see if I can change the packaging type in the pom to jar but still make it an bundle using the maven-bundle-plugin.
  • Feature Request #76 - Review/Apply patches submitted by Dolzhenko for CSVWriter performance improvements.
  • Look at CSVWriter and CSVReader to see what currently private values need to be protected. In CSVReader the linesRead and recordsRead need to be protected as they are currently being modified by protected methods - anyone overriding these methods would need to modify these values. Completed by Andrew.
  • Annotation updates by Andrew.

Release 3.7 - 1/28/2016

  • bug #121 Modified ResultSetHelper to handle Nan, Infinity, -Infinity for float and double column types.
  • bug #123 When CSVWriter quote char is set to NO_QUOTE_CHAR then need to escape separators that are in a field.
  • Patch request #51 Added ResultSetColumnNameHelperService to allow a user to pick a subset of columns of an result set and specify an order.
  • issue #86 - more of an feature request than issue. Made private methods called by public methods in the CSVReader, CSVWriter, and CSVParser protected to make it easier to extend the classes.

Release 3.6 - 11/7/2015

  • Feature Request #71 - added date and time format setters to the ResultSetHelperService.
  • Fixed bug #118 remove deprecation of getType in HeaderColumnNameMappingStrategy.
  • Feature Request #68 CsvWriter.writeAll with ResultSet will now return the number of lines written, including header.
  • Feature Request #66 - CsvToBean will print out the line and line number in the exception if there is an error.
  • Ran code through JProfiler and found some bottlenecks in the use of StringBuffer.append(). Modified code to use the size of the buffer to be read/write instead of an default size to eliminate the buffer resizing.
  • New Feature - Thanks to Tom Squires there is now a CSVBind annotation to denote fields in a Bean that are required (cannot be null, empty or blank).
  • Feature Request #73 - Add methods to CSVReader to allow the user to query how many lines/records have been read.

Release 3.5 - 8/2/2015

  • fixed bug #115 - think I finally fixed the isClosed issue (yay).
  • Cleaned up diamond operators so it the code will now compile in JDK 6 and JDK 8 (Thanks to KommradHomer for this fix). Note I am not planning on another JDK upgrade anytime soon and I am not promising backward compatibility below JDK 7 - it is too much trouble to maintain multiple branches.
  • Added IterableCSVToBean! This will allow you to read one object at a time instead of an entire list.

Release 3.4 - 6/2/2015

  • feature request #60 - allow toggle to determine what constitutes a null value.
  • fixed Bug #112 - Updated support url in pom file.
  • fixed Bug #92 - Changed ResultSetHelperService to use getColumnLabel instead of getColumnName. This way if the column has an alias that will be used.
  • bug #109 - fixed isClosed method in CSVReader.
  • bug #98 - Added LICENSE file for the users in the fedora project.

Release 3.3 - 3/7/2015

  • fixed Bug #106 - respect the carriage return within quotes.
  • fixed Bug #108 - Not reading stream when using nio Channels
  • When creating integration test for SR34 I realized that several methods in the CSVReaderBuilder and CSVParserBuilder were package instead of public so I fixed that.
  • Bug #107 - update the opencsv.sourceforge.net! I found an awesome article at http://maven.apache.org/plugins/maven-site-plugin/examples/site-deploy-to-sourceforge.net.html that walked me through the whole process.

Release 3.2 - 1/31/2015

  • Made private methods in ResultSetHelper protected to allow users to override them in child classes (patch request #49)
  • Beefed up reports generated by maven site and have cleared up some of the issues brought up by findbugs and PMD
  • Added dependency on apache commons to help with some of the String processing and reduce complexity.
  • With a special thanks to Larry Issue #102 has been resolved.

Release 3.1 - 11/8/2014

  • Switched out cobertura with Jacoco. At my work we have had lots of problems with cobertura and Java 7 so I wanted to be preemptive.
  • Updated dependencies with newer threadsafe versions so I can speed up my builds a little bit in maven 3.
  • Feature Request #67 - merged in patch adding filters to the mapping strategy.

Release 3.0 - 9/9/2014

First off I want to thank our newest developer Maciek Opała. I will also try and be active again for a while but life and work have conspired to take away all my free time.

  • Thanks to Maciek openCSV is upgraded to Java 7!
  • He has also fixed an issue reported on the groovycsv library (I did not know we were being used by groovy - it's quite humbling). You can read the stack overflow article to find out more.

Related

Wiki: FAQ
Wiki: Home