Menu

#35 CsvListReader reuses List on each read()

2.0.0
closed
None
7
2012-11-12
2012-11-01
No

The List returned by CsvListReader.read() is actually the same object each time.
As this List gets cleared each time, this can cause really unexpected behaviour when the calling code has references to the Lists and they become empty.

This behaviour was introduced in 2.0.0-beta-1 (it was previously behaving as expected - a new List was returned each time).

Link to forum topic: [discussion:eb96669c]

Related

Discussion: eb96669c
Discussion: CsvListReader returns always same ArrayList reference

Discussion

  • James Bassett

    James Bassett - 2012-11-01
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -2,3 +2,6 @@
     As this List gets cleared each time, this can cause really unexpected behaviour when the calling code has references to the Lists and they become empty.
    
     This behaviour was introduced in 2.0.0-beta-1 (it was previously behaving as expected - a new List was returned each time).
    +
    +Link to forum topic: [discussion:eb96669c]
    +
    
     
  • James Bassett

    James Bassett - 2012-11-02

    Fixed for v2.0.0

    [r256]

     

    Related

    Commit: [r256]

  • James Bassett

    James Bassett - 2012-11-02
    • status: open --> pending
     
  • James Bassett

    James Bassett - 2012-11-12
    • Status: pending --> closed
     

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.