fubar-coder / beanio

Automatically exported from code.google.com/p/beanio
Apache License 2.0
0 stars 0 forks source link

Bug on FixedLengthReader recordTerminator #92

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On the below code snippet of class 
org.beanio.stream.fixedlength.FixedLengthReader, in the line 77 the string 
"\n\r" should be "\r\n", otherwise if the user sets the recordTerminator 
parameter, the code wil always fail.

if (config.getRecordTerminator() != null) {
            String s = config.getRecordTerminator();
            if ("\n\r".equals(s)) {
                // use default
            }
            else if (s.length() == 1) {
                this.recordTerminator = s.charAt(0);
            }
            else if (s.length() > 1) {
                throw new IllegalArgumentException("Record terminator must be a single character");
            }
        }

Original issue reported on code.google.com by eduardoc...@gmail.com on 19 Sep 2013 at 1:31

GoogleCodeExporter commented 9 years ago
This was fixed in 2.0.7.

Original comment by kevin.s...@gmail.com on 21 Sep 2013 at 2:04

GoogleCodeExporter commented 9 years ago
I understand but i'm using version 2.1.0.M1 due to annotations

Em sexta-feira, 20 de setembro de 2013, escreveu:

Original comment by eduardoc...@gmail.com on 21 Sep 2013 at 5:45