<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Home</title><link>https://sourceforge.net/p/opencsv/wiki/Home/</link><description>Recent changes to Home</description><atom:link href="https://sourceforge.net/p/opencsv/wiki/Home/feed" rel="self"/><language>en</language><lastBuildDate>Mon, 23 Nov 2020 11:08:51 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/opencsv/wiki/Home/feed" rel="self" type="application/rss+xml"/><item><title>Discussion for Home page</title><link>https://sourceforge.net/p/opencsv/wiki/Home/?limit=25#0816/2dd5/3a4e/60bd/0f73</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Ok - I found the reason for the behavior and created ticket &lt;a href="https://sourceforge.net/p/opencsv/feature-requests/142/"&gt;https://sourceforge.net/p/opencsv/feature-requests/142/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You may think that it makes no sense to do such a coding. But that's how it looked liked before and worked with older versions of OpenCSV.&lt;br/&gt;
So for me not really a bug, but some changes in implementation that may force users to adapt there code.&lt;/p&gt;
&lt;p&gt;Thanks again for your support!&lt;br/&gt;
We are now happy (again) with OpenCSV in version 5.3 ;-).&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Norbert Becker</dc:creator><pubDate>Mon, 23 Nov 2020 11:08:51 -0000</pubDate><guid>https://sourceforge.netf10d0447e17d683cc0d2e5c51e3d119a7616df53</guid></item><item><title>Discussion for Home page</title><link>https://sourceforge.net/p/opencsv/wiki/Home/?limit=25#0816/2dd5/3a4e/60bd</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Yes please send us a test case!    In 5.4 we refactored the CsvToBeanBuilder withThrowsException method to essentially call the setThrowException on the CsvToBean in the build method.   We do have tests on that and they are passing.    So I am curious as to what we missed.   &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Scott Conway</dc:creator><pubDate>Fri, 20 Nov 2020 16:54:44 -0000</pubDate><guid>https://sourceforge.netf127e67da056bda130b9c9881312c56baaafa55d</guid></item><item><title>Discussion for Home page</title><link>https://sourceforge.net/p/opencsv/wiki/Home/?limit=25#0816/2dd5/3a4e/5a58</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I'm very bothered by your claim that exceptions are not being collected and reported with setThrowExceptions(false) and getCapturedExceptions(). Could you possibly open a ticket and provide us with a verifyable test case?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrew Rucker Jones</dc:creator><pubDate>Thu, 19 Nov 2020 18:05:14 -0000</pubDate><guid>https://sourceforge.net951c4c71dd427c4ed77968f515c47e851497bf96</guid></item><item><title>Discussion for Home page</title><link>https://sourceforge.net/p/opencsv/wiki/Home/?limit=25#0816/2dd5/3a4e</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Andrew &amp;amp; Scott,&lt;br/&gt;
thanks for the swift reply!&lt;/p&gt;
&lt;p&gt;Regarding syntax handling aligned to RFC4180: Ok - that's understandable and acceptable :-). The main problem had been that I got no error and the lines where just skipped. I checked our error handling: We use CsvToBean.setThrowExceptions(false) and retrieve the list of exceptions by CsvToBean.getCapturedExceptions() after parsing has finished. This list is still empty?! I changed the code and now use CsvToBean.setErrorHandler() to collect the exceptions. Now it works and I get an exception for each corrupted line ;-).&lt;br/&gt;
So maybe a bug regarding the compat code for collecting exceptions? The JavaDoc recomments the use of an exception handler anyway and I leave it up to you to fix it or not. We no longer need the flag/getter...&lt;/p&gt;
&lt;p&gt;Regarding usage of setter: You are right - setters are used if they exist. But the finding out whether a setter exist is done by the field name: myProperty -&amp;gt; setMyProperty().&lt;br/&gt;
Our "mistake" has been that we use different names which is indeed not standard for Java Beans: property/setMyProperty(). In Version 3.8 this works if you use myProperty as column name.  Only to let you know ... we adjusted this codes.&lt;/p&gt;
&lt;p&gt;So to wrap it up: The problems where solved.&lt;br/&gt;
Thanks for your support!&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Norbert Becker</dc:creator><pubDate>Thu, 19 Nov 2020 10:43:45 -0000</pubDate><guid>https://sourceforge.net51a80ba8ba7541ad274ebee567300a4a0b608871</guid></item><item><title>Discussion for Home page</title><link>https://sourceforge.net/p/opencsv/wiki/Home/?limit=25#0816/2dd5</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;Sorry but Andrew is actually being nice. You can blame me for this and I will gladly take it.&lt;/p&gt;
&lt;p&gt;It was not just #155 but we had several bugs in a short period of time where malformed (missing or extra column) data was causing parse errors. Some benign like what you actually want (null or empty field) but some were very malicious as a missing column caused all the data to be shifted and opencsv was trying to figure out how to convert "some string" into an Integer or Date.&lt;/p&gt;
&lt;p&gt;And the last part was the problem. We can ASSume that the data was not malformed and that missing columns were the last columns intentionally removed but that causes issues when it IS malformed and could potentially make it harder to debug - especially when everything is a String.&lt;br/&gt;
So when dealing with this we went back to the RFC4180 specification on CSV files:&lt;/p&gt;
&lt;p&gt;*4.  Within the header and each record, there may be one or more&lt;br/&gt;
fields, separated by commas. Each line should contain the same&lt;br/&gt;
number of fields throughout the file. Spaces are considered part&lt;br/&gt;
of a field and should not be ignored. The last field in the&lt;br/&gt;
record must not be followed by a comma. For example:&lt;/p&gt;
&lt;p&gt;aaa,bbb,ccc*&lt;/p&gt;
&lt;p&gt;This is in section 2 of the document: &lt;a href="https://tools.ietf.org/html/rfc4180" rel="nofollow"&gt;https://tools.ietf.org/html/rfc4180&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So what we do parse the first record to get the "required" number of fields and any record after that must have that number or it is in error.&lt;/p&gt;
&lt;p&gt;Honestly I am surprised no one has taken us to task on the second part of number four (last field must not be followed by a comma). But if no one is complaining then I am okay with our current behavior (treat it as null or empty string depending on settings).&lt;/p&gt;
&lt;p&gt;Sorry, I know that was not what you wanted to hear. But there was alot of history behind making that decision and wanted you to know it was not made lightly because we really do take backwards compatibility seriously and only break it when we feel it is absolutely necessary. And it this case it was as it we needed to follow the standards to stop all the bugs we were getting from malformed csv files.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Scott Conway</dc:creator><pubDate>Wed, 18 Nov 2020 21:02:35 -0000</pubDate><guid>https://sourceforge.net50a0f51cbbb0475e84ff7856ce0d9c1939ff912d</guid></item><item><title>Discussion for Home page</title><link>https://sourceforge.net/p/opencsv/wiki/Home/?limit=25#947e</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hello &lt;/p&gt;
&lt;p&gt;Sorry but Andrew is actually being nice.   You can blame me for this and I will gladly take it.   &lt;/p&gt;
&lt;p&gt;It was not just #155 but we had several bugs in a short period of time where malformed (missing or extra column) data was causing parse errors.   Some benign like what you actually want (null or empty field) but some were very malicious as a missing column caused all the data to be shifted and opencsv was trying to figure out how to convert "some string" into an Integer or Date.  &lt;/p&gt;
&lt;p&gt;And the last part was the problem.   We can ASSume that the data was not malformed and that missing columns were the last columns intentionally removed but that causes issues when it IS malformed and could potentially make it harder to debug - especially when everything is a String.&lt;br/&gt;
So when dealing with this we went back to the RFC4180 specification on CSV files:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Within the header and each record, there may be one or more&lt;br/&gt;
       fields, separated by commas. &lt;strong&gt; Each line should contain the same&lt;br/&gt;
       number of fields throughout the file&lt;/strong&gt;.  Spaces are considered part&lt;br/&gt;
       of a field and should not be ignored.  The last field in the&lt;br/&gt;
       record must not be followed by a comma.  For example:&lt;/p&gt;
&lt;p&gt;aaa,bbb,ccc&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This is in section 2 of the document: &lt;a href="https://tools.ietf.org/html/rfc4180" rel="nofollow"&gt;https://tools.ietf.org/html/rfc4180&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So what we do parse the first record to get the "required" number of fields and any record after that must have that number or it is in error. &lt;/p&gt;
&lt;p&gt;Honestly I am surprised no one has taken us to task on the second part of number four (last field must not be followed by a comma).   But if no one is complaining then I am okay with our current behavior (treat it as  null or empty string depending on settings).  &lt;/p&gt;
&lt;p&gt;Sorry, I know that was not what you wanted to hear.  But there was alot of history behind making that decision and wanted you to know it was not made lightly because we really do take backwards compatibility seriously and only break it when we feel it is absolutely necessary.   And it this case it was as it we needed to follow the standards to stop all the bugs we were getting from malformed csv files.  &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Scott Conway</dc:creator><pubDate>Wed, 18 Nov 2020 21:00:44 -0000</pubDate><guid>https://sourceforge.nete8a502ae9617f0720bd54a2a4b7676467ff0a5cf</guid></item><item><title>Discussion for Home page</title><link>https://sourceforge.net/p/opencsv/wiki/Home/?limit=25#0816/1622</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Would have prefered to see a ticket for this, but whatever. :)&lt;/p&gt;
&lt;p&gt;Lazy separators: I'm surprised this ever worked. It looks like maybe it was bug #155 that fixed this. I doubt we would be willing to support this, since that kind of input is simply malformed.&lt;/p&gt;
&lt;p&gt;Using setters: I'm surprised to hear you say this. The code for assigning values to fields is consistent in opencsv, no matter what binding method is used. (That was the reason we got rid of Introspection—half the code used it, half didn't.) opencsv always uses a setter if it's available. That said, the setter is not a setter in the true bean/Introspection sense. The bean definition allows one to choose any name one wants for setters as long as a property file exists to define the mapping from setter to field. (At least that's what I remember reading.) opencsv does nothing more than honor the convention that the setter for "myProperty" is called "setMyProperty".&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrew Rucker Jones</dc:creator><pubDate>Wed, 18 Nov 2020 19:40:14 -0000</pubDate><guid>https://sourceforge.net5e24de14e64d820ab5cd5819d385ed9557940891</guid></item><item><title>Discussion for Home page</title><link>https://sourceforge.net/p/opencsv/wiki/Home/?limit=25#0816</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
we have been using OpenCSV Version 3.8 for a longer time.&lt;br/&gt;
Now we migrated our code to Version 5.3 and have (by now :-) two issues:&lt;/p&gt;
&lt;p&gt;First issue:&lt;br/&gt;
We have an input file like this:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="ss"&gt;"A-column"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="ss"&gt;"B-column"&lt;/span&gt;
&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The bean is mapped to "A-column" and "B-column" by HeaderColumnNameTranslateMappingStrategy. The B-column value is optional.&lt;br/&gt;
The effect in 5.3 is that NO line is parsed: We got an emty list - no error is thrown&lt;br/&gt;
Changing it to ...&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="ss"&gt;"A-column"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="ss"&gt;"B-column"&lt;/span&gt;
&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;... makes it work. But the problem is that users of our applications use such files.&lt;br/&gt;
Questions:&lt;br/&gt;
&lt;em&gt; Is there a may to make this "lazy" separator handling work again?&lt;br/&gt;
&lt;/em&gt; Is it a bug that no error is raised for those input lines?&lt;/p&gt;
&lt;p&gt;Second issue:&lt;br/&gt;
We do not use CsvBindByName annotations. No we found out that OpenCSV 5.3 only uses the fields for setting the value. The former Version 3.8 did also use setter. These is possible the case because the old version used the java.beans.PropertyEditor framework.&lt;br/&gt;
Is there a way to use the setter to?&lt;/p&gt;
&lt;p&gt;Thanks for a swift answer!&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Norbert Becker</dc:creator><pubDate>Wed, 18 Nov 2020 18:43:31 -0000</pubDate><guid>https://sourceforge.net9fb5024b7b9f913f1d5e87f77af372f1e382d30f</guid></item><item><title>Discussion for Home page</title><link>https://sourceforge.net/p/opencsv/wiki/Home/?limit=25#b5bc/6a88/c705/a21d/25f0</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Ok, going to try that, thank you very much&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">andres reynoso</dc:creator><pubDate>Sun, 26 Apr 2020 20:22:54 -0000</pubDate><guid>https://sourceforge.net686364a6c3616a7b7daf960da7806e52e5aa62a8</guid></item><item><title>Discussion for Home page</title><link>https://sourceforge.net/p/opencsv/wiki/Home/?limit=25#b5bc/6a88/c705/a21d</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I'm not sure what you mean. You pass a BeanVerifier to CsvToBeanBuilder.withVerifier() and opencsv uses it internally. You personally never pass anything to a BeanVerifier in your code.&lt;/p&gt;
&lt;p&gt;Your code sample has a few problems. First of all, the first line of your verifyBean() method is a no-op. I think you mean to assign rowDto to this.rowDto. That would lead to the next problem, though. As stated in the Javadoc, BeanVerifiers &lt;em&gt;must&lt;/em&gt; be thread-safe, and that is not thread-safe behavior. I don't know what you're doing in fieldValidOrThrow(), but I would recommend moving that code directly into verifyBean(), where it's supposed to be, and definitely remove the private instance variable rowDto.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrew Rucker Jones</dc:creator><pubDate>Sun, 26 Apr 2020 20:21:22 -0000</pubDate><guid>https://sourceforge.net33d2bb14efb774c5fa5924d2c55ce84222ef08a1</guid></item></channel></rss>