uniVocity / univocity-parsers

uniVocity-parsers is a suite of extremely fast and reliable parsers for Java. It provides a consistent interface for handling different file formats, and a solid framework for the development of new parsers.
917 stars 252 forks source link

`parseRecord(bean)` does not work #522

Open pasolid opened 1 year ago

pasolid commented 1 year ago

Your own example/test literally does nothing for writer.processRecord(bean) , prints empty values for the object.

Located in the src/test/java/com/univocity/parsers/examples/WriterExamples.java under test example005WriteFixedWidthUsingAnnotatedBean

For the TestBean object :

        TestBean bean = new TestBean();
        bean.setAmount(new BigDecimal("500.33"));
        bean.setComments("Blah,blah");
        bean.setPending(false);
        bean.setQuantity(100);

It supposed to print:

amount    pending   date    quantity     comments                                
500.33.    false       ?             100         "Bla, blah"                                                                                                            

But instead it prints:

amount    pending   date    quantity     comments                                
?             ?         ?            ?         ?

This explains why I couldn’t make it work...