commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <>
Subject [jira] Updated: (SANDBOX-322) CSVPrinter overhaul
Date Mon, 14 Jun 2010 18:27:16 GMT


Yonik Seeley updated SANDBOX-322:

    Attachment: SANDBOX-322.patch

Patch attached.  Overview of changes:
- CSVPrinter no longer wraps the provided writer in a PrintWriter... the reason is that the
passed writer can often be more efficient than PrintWriter.
- CSVPrinter no longer flushes all of the time - that should be up to the user
- users have access to the lowest level if desired... ability to pass a char[] + length/offset
- rewrote the output methods: writing no longer uses a StringBuffer, and writes are done in
big chunks, not character-by-character
- removed the use of the system property "line.separator" - local specific behavior should
normally be avoided.  A printerNewline was added to the strategy instead.
- in CSVParser, only throw away leading whitespace if the strategy calls for it
- added round-trip testing with random strings to ensure that encapsulation and escaping strategies
can be both correctly encoded and then decoded with no loss of information.

During testing, I hit an issue where the tests ran fine in my IDE, but failed for "mvn test".
 I tracked this down to the fact that many tests were actually changing the default strategy
object.  This test code was changed to make a clone if they were going to change it.

> CSVPrinter overhaul
> -------------------
>                 Key: SANDBOX-322
>                 URL:
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: CSV
>            Reporter: Yonik Seeley
>         Attachments: SANDBOX-322.patch
> CSVPrinter has a lot of problems to fix, from efficiency, to not producing well-formed

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message