Menu

#185 CsvToBeanFilter Documentation

v1.0 (example)
closed-fixed
None
5
2019-02-10
2018-11-10
Jack
No

The example code in the documentation of the CsvToBeanFilter class doesn't compile.

The first thing is the class' constructor has the wrong name.

However, when you fix this it's then depending on a deprecated method (com.opencsv.bean.MappingStrategy.getColumnIndex(String)) which ironically has the deprecation message of "There is no replacement for this method, since we are not aware of a use for it. Let us know if you have a use case."

I am getting started with CsvToBeanFilters and would appreciate any pointers if I'm looking in the wrong place.

Discussion

  • Andrew Rucker Jones

    • assigned_to: Andrew Rucker Jones
     
  • Andrew Rucker Jones

    Yeah, you've caught us at an inopertune moment. I became aware of that use for getColumnIndex() after I deprecated it, and the replacement for CsvToBeanFilter (BeanVerifier) is in master, but hasn't been released yet. Right now, just use the deprecated getColumnIndex() if you have to. It should be very easy to move from CsvToBeanFilter to BeanVerifier once 4.4 is released.

    I'll take care of the documentation error another time, but thanks very much for pointing it out. I believe in flawless documentation.

     
  • Jack

    Jack - 2018-11-10

    Thanks for getting back to me.

     
  • Jack

    Jack - 2018-11-12

    Any ideas when 4.4 is likely to be released? I think that that would have some interesting applications for me.

     
  • Andrew Rucker Jones

    Fixed the error in the constructor name in the documentation.

    I don't know right now when 4.4 will be released. I'm consulting with the head developer.

     
  • Scott Conway

    Scott Conway - 2018-11-16

    Andrew, Jack - sorry it took so long to get back to you. Looking at the feature and bug requests I see nothing worth holding up a release so I will look at doing a 4.4 release this weekend.

    Scott :)

     
  • Andrew Rucker Jones

    • status: open --> pending
     
  • Scott Conway

    Scott Conway - 2018-11-18

    4.4 is released. Please fell free to test it.

     
  • Jack

    Jack - 2018-11-18

    thanks, i will have a look at this. Would i be right in assuming that the BeanVerifier is slower than CsvToBeanFilter?

     
  • Andrew Rucker Jones

    Only in that the input is fully converted into a bean before running the verifier. That doesn't take but an instant, and it allows you to worry only about consistency of values instead of locating and converting values in an array of strings just so you can verify that the values are okay and pass them on to our code that then locates and converts them from the same array of strings.

     
  • Scott Conway

    Scott Conway - 2019-02-10
    • status: pending --> closed-fixed
     
  • Scott Conway

    Scott Conway - 2019-02-10

    fixed in version 4.4

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.