Menu

#1 CSV writer bug

open
nobody
None
5
2008-05-29
2008-05-29
Racy
No

In version 1.6.1:

In file RenderUtils.java line 187 there is a line that gives a class cast error:
Writer csv = csvConstructor.newInstance(target);

Later on that object is used with:
csv.flush();

I recommend the following changes:
Replace the first line with:
Object csv = csvConstructor.newInstance(target);

Replace the flush line with:
Method flushRecord = csvClass.getDeclaredMethod("flush");
flushRecord.invoke(csv);

Discussion


Log in to post a comment.