This ticket is the result of the discussion on the home page: https://sourceforge.net/p/opencsv/wiki/Home/#0816/2dd5/3a4e
Please see my test code for reproducing the problem:
testCollectExceptionsOk() works
testCollectExceptionsWrongUsage() does not
In Version 3.8 coders may hold a pointer to the CsvToBean.getCapturedExceptions() List and captured exceptions had been added to the list while parsing.
NOW (I don't know the version when this changed) this does no longer work because CsvToBean.getCapturedExceptions() is not just a getter but may delegate to the underlying LineExcecuter.
I am pretty sure that you may not want to fix/change this. But I created the ticket anyway to document that this worked in 3.8 and does not in 5.3...
So that's what you mean! Oh, no, that was never intended usage, and it was rather risky of you to try it, since good coding dictates we shouldn't pass internal structures to the outside world. It should always have been a copy, but I messed that up.
I will leave this ticket open until I get a chance to document that getCapturedExceptions() does not return consistent results until parsing is over. Thanks for mentioning it.
This has been documented.
5.4 was released a couple of days ago.