Commit Graph

926 Commits

Author SHA1 Message Date
Gary D. Gregory 4b00469b22 Camel case.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1603204 13f79535-47bb-0310-9956-ffa450edef68
2014-06-17 15:49:26 +00:00
Gary D. Gregory 04cee2bb14 Better error message in test.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1603203 13f79535-47bb-0310-9956-ffa450edef68
2014-06-17 15:45:39 +00:00
Gary D. Gregory 30860d62bd Checkstyle: Line has trailing spaces.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1602945 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 18:09:03 +00:00
Gary D. Gregory c1049b549b Use final.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1602944 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 18:07:45 +00:00
Gary D. Gregory 2076464484 class Lexer implements Closeable.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1602919 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 16:16:48 +00:00
Gary D. Gregory bfa592d06b Checkstyle: Line has trailing spaces.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1602909 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 15:58:42 +00:00
Gary D. Gregory 32ffe82a5f Checkstyle: '+' should be on the previous line.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1602908 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 15:53:11 +00:00
Gary D. Gregory cdbb1cd1a6 Checkstyle: '+' should be on the previous line.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1602907 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 15:52:50 +00:00
Gary D. Gregory fa116dd46c Format "for".
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1602906 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 15:50:14 +00:00
Gary D. Gregory 1fa12a6fc8 Checkstyle: Line is longer than 120 characters (found 141).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1602904 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 15:48:40 +00:00
Gary D. Gregory 4b2a4caa30 Checkstyle: Line has trailing spaces.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1602903 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 15:44:47 +00:00
Gary D. Gregory b993abb315 Checkstyle: Line has trailing spaces.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1602902 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 15:43:51 +00:00
Gary D. Gregory 229b3b7691 org.apache.commons.csv.CSVParser.parse(File, Charset, CSVFormat) is now like org.apache.commons.csv.CSVParser.parse(URL, Charset, CSVFormat): You must pass in a Charset.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1602901 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 15:39:52 +00:00
Gary D. Gregory 49579ec643 Forgot to make org.apache.commons.csv.CSVFormat.ignoreEmptyHeaders final.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1602242 13f79535-47bb-0310-9956-ffa450edef68
2014-06-12 17:33:12 +00:00
Gary D. Gregory 99c3819bec [CSV-121] Exception that the header contains duplicate names when the column names are empty. Added the setting ignoreEmptyHeaders, defaults to false to keep the IAE as the default behavior.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1602206 13f79535-47bb-0310-9956-ffa450edef68
2014-06-12 15:38:24 +00:00
Gary D. Gregory f9871c5d35 [CSV-121] Exception that the header contains duplicate names when the column names are empty. Add a test that shows that TWO missing header is not OK.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1602168 13f79535-47bb-0310-9956-ffa450edef68
2014-06-12 13:59:33 +00:00
Gary D. Gregory 5a9436d462 [CSV-121] Exception that the header contains duplicate names when the column names are empty. Add a test that shows that ONE missing header is OK.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1602166 13f79535-47bb-0310-9956-ffa450edef68
2014-06-12 13:57:48 +00:00
Gary D. Gregory 1282503fb9 <action issue="CSV-120" type="add" dev="ggregory" due-to="Sergei Lebedev">CSVFormat#withHeader doesn't work with CSVPrinter</action>
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1601517 13f79535-47bb-0310-9956-ffa450edef68
2014-06-09 22:21:22 +00:00
Gary D. Gregory 65f110ec14 <action issue="CSV-119" type="add" dev="ggregory" due-to="Sergei Lebedev">CSVFormat is missing a print(...) method</action>
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1599285 13f79535-47bb-0310-9956-ffa450edef68
2014-06-02 18:04:49 +00:00
Gary D. Gregory 2480dffa6d <action issue="CSV-118" type="fix" dev="ggregory" due-to="Enrique Lara">CSVRecord.toMap() throws NPE on formats with no headers.</action>
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1594966 13f79535-47bb-0310-9956-ffa450edef68
2014-05-15 16:26:26 +00:00
Gary D. Gregory 0331565fba Format with 2 spaces per XML indent and 120 chars line width.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1594965 13f79535-47bb-0310-9956-ffa450edef68
2014-05-15 16:24:56 +00:00
Sebastian Bazley 88a7e755e6 CSV-113 Check whether ISE/IAE are being used appropriately
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1593148 13f79535-47bb-0310-9956-ffa450edef68
2014-05-07 22:12:56 +00:00
Sebastian Bazley 16b175b01a tab police
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1593097 13f79535-47bb-0310-9956-ffa450edef68
2014-05-07 18:12:10 +00:00
Sebastian Bazley 7945a4f24c Javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1593094 13f79535-47bb-0310-9956-ffa450edef68
2014-05-07 18:09:06 +00:00
Sebastian Bazley 35d101c2ad CSV-114 CSVFormat constructor should reject a header array with duplicate entries
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1593076 13f79535-47bb-0310-9956-ffa450edef68
2014-05-07 17:27:31 +00:00
Benedikt Ritter 692a1e362d Make CSVFormat constructor package private since it is only used in CSVFormat.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1592833 13f79535-47bb-0310-9956-ffa450edef68
2014-05-06 18:37:15 +00:00
Benedikt Ritter 4698a563dc Add missing fields to hashcode and equals methods
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1592832 13f79535-47bb-0310-9956-ffa450edef68
2014-05-06 18:32:38 +00:00
Benedikt Ritter 3e8fe990dd Add some pointers for contirbutors
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1592830 13f79535-47bb-0310-9956-ffa450edef68
2014-05-06 18:24:17 +00:00
Benedikt Ritter 85226d80e6 CSV-115: Simplify boolean expressions in CSVRecord. This also closes #1 from github. Thanks to Furkan Kamaci.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1592822 13f79535-47bb-0310-9956-ffa450edef68
2014-05-06 18:11:37 +00:00
Sebastian Bazley a3260ed930 Avoid IDE warning
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1592639 13f79535-47bb-0310-9956-ffa450edef68
2014-05-05 22:03:17 +00:00
Benedikt Ritter d030030d3d Shamelessly steal the support section from commons lang
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1592616 13f79535-47bb-0310-9956-ffa450edef68
2014-05-05 19:26:41 +00:00
Benedikt Ritter c08219e0d7 Document reliance of parse(File, CSVFormat) to default encoding
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1592604 13f79535-47bb-0310-9956-ffa450edef68
2014-05-05 18:45:55 +00:00
Benedikt Ritter 07a73d2824 Fix checkstyle error
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1592600 13f79535-47bb-0310-9956-ffa450edef68
2014-05-05 18:36:31 +00:00
Benedikt Ritter a3da0a7a5a CSV now has it's own jira project
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1592596 13f79535-47bb-0310-9956-ffa450edef68
2014-05-05 18:25:33 +00:00
Benedikt Ritter 7d51af9404 Make checkstyle happy (line is longer than 120 characters)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1592382 13f79535-47bb-0310-9956-ffa450edef68
2014-05-04 17:01:07 +00:00
Benedikt Ritter 2fdf2c8a19 Document all fixed issues
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1592380 13f79535-47bb-0310-9956-ffa450edef68
2014-05-04 16:58:53 +00:00
Benedikt Ritter ce4e72701b CSV-112: HeaderMap is inconsistent when it is parsed from an input with duplicate columns names. Reported by Romain Gossé
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1592371 13f79535-47bb-0310-9956-ffa450edef68
2014-05-04 16:22:34 +00:00
Benedikt Ritter c84328e64a Fix JavaDoc errors
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1592365 13f79535-47bb-0310-9956-ffa450edef68
2014-05-04 16:08:56 +00:00
Gary D. Gregory 9f03b06a1e [CSV-111] CSVRecord.toMap() fails if row length shorter than header length.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1589281 13f79535-47bb-0310-9956-ffa450edef68
2014-04-22 20:20:17 +00:00
Gary D. Gregory a84668e0ea Revert.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1585716 13f79535-47bb-0310-9956-ffa450edef68
2014-04-08 13:02:01 +00:00
Gary D. Gregory 966cd208ca [CSV-110] Add ability to parse single lines.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1585496 13f79535-47bb-0310-9956-ffa450edef68
2014-04-07 14:50:26 +00:00
Gary D. Gregory 51f226d0f8 Add org.apache.commons.csv.CSVParserTest.testGetOneLineOneParser(). See discussion in [CSV-110].
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1585492 13f79535-47bb-0310-9956-ffa450edef68
2014-04-07 14:31:03 +00:00
Gary D. Gregory 0f3b3367c3 Add org.apache.commons.csv.CSVParserTest.testGetOneLineOneParser(). See discussion in [CSV-110].
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1585491 13f79535-47bb-0310-9956-ffa450edef68
2014-04-07 14:29:32 +00:00
Gary D. Gregory 8e18054f3b Better ivar name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1585096 13f79535-47bb-0310-9956-ffa450edef68
2014-04-05 14:06:43 +00:00
Gary D. Gregory 5daf49a180 Add API org.apache.commons.csv.CSVParser.getRecords(T).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1584936 13f79535-47bb-0310-9956-ffa450edef68
2014-04-04 23:28:17 +00:00
Gary D. Gregory c2ed3be44d Add API org.apache.commons.csv.CSVParser.getRecords(T).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1584903 13f79535-47bb-0310-9956-ffa450edef68
2014-04-04 20:44:46 +00:00
Gary D. Gregory 6b3afdc93d Clean up constant name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1584893 13f79535-47bb-0310-9956-ffa450edef68
2014-04-04 20:30:02 +00:00
Sebastian Bazley ffdfffb8f2 TRailing spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1582822 13f79535-47bb-0310-9956-ffa450edef68
2014-03-28 16:52:17 +00:00
Sebastian Bazley 7bba60a559 Ensure resources are released
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1582817 13f79535-47bb-0310-9956-ffa450edef68
2014-03-28 16:44:41 +00:00
Sebastian Bazley 9873b13df2 Don't omit default cases
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1582814 13f79535-47bb-0310-9956-ffa450edef68
2014-03-28 16:38:26 +00:00
Sebastian Bazley 1933f8abaf Avoid resource leak warnings
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1582813 13f79535-47bb-0310-9956-ffa450edef68
2014-03-28 16:37:54 +00:00
Sebastian Bazley d6294bc598 Ignore test code boxing
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1582812 13f79535-47bb-0310-9956-ffa450edef68
2014-03-28 16:37:35 +00:00
Gary D. Gregory 0fbefc96be Add some interesting ASCII codes to Constants class.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1582481 13f79535-47bb-0310-9956-ffa450edef68
2014-03-27 21:22:59 +00:00
Gary D. Gregory e454d6847e Simplest behavior: null -> exception, like the other params.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1578504 13f79535-47bb-0310-9956-ffa450edef68
2014-03-17 18:41:52 +00:00
Gary D. Gregory 5d5458d7f6 Simplest behavior: null -> exception, like the other params.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1578502 13f79535-47bb-0310-9956-ffa450edef68
2014-03-17 18:40:58 +00:00
Gary D. Gregory c8630e103a Clean up tests for [CSV-107] CSVFormat.EXCEL.parse should handle byte order marks.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1578397 13f79535-47bb-0310-9956-ffa450edef68
2014-03-17 14:32:38 +00:00
Gary D. Gregory fcdf1f2efa Clean up tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1578199 13f79535-47bb-0310-9956-ffa450edef68
2014-03-17 01:08:43 +00:00
Gary D. Gregory 3cb24cbdfb The charset can be null and will default to UTF-8.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1578198 13f79535-47bb-0310-9956-ffa450edef68
2014-03-17 01:08:00 +00:00
Gary D. Gregory f3f34073ae Testing [CSV-107] CSVFormat.EXCEL.parse should handle byte order marks
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1578197 13f79535-47bb-0310-9956-ffa450edef68
2014-03-17 01:06:17 +00:00
Gary D. Gregory c4f74756ff Testing [CSV-107] CSVFormat.EXCEL.parse should handle byte order marks
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1578196 13f79535-47bb-0310-9956-ffa450edef68
2014-03-17 01:05:57 +00:00
Gary D. Gregory c473d87f23 The charset can be null and will default to UTF-8.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1578191 13f79535-47bb-0310-9956-ffa450edef68
2014-03-17 00:50:55 +00:00
Gary D. Gregory 7b8cc87fd8 Format.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1578189 13f79535-47bb-0310-9956-ffa450edef68
2014-03-17 00:48:01 +00:00
Gary D. Gregory fa3416da03 Sort methods.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1578187 13f79535-47bb-0310-9956-ffa450edef68
2014-03-17 00:33:09 +00:00
Gary D. Gregory 73cc5246cf [CSV-106] CSVFormat.format always append null.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1577011 13f79535-47bb-0310-9956-ffa450edef68
2014-03-13 00:16:57 +00:00
Gary D. Gregory bf8f23c310 Sort in AB order.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1576750 13f79535-47bb-0310-9956-ffa450edef68
2014-03-12 14:29:33 +00:00
Gary D. Gregory 2414250b69 Fix generics issue.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1560399 13f79535-47bb-0310-9956-ffa450edef68
2014-01-22 16:07:23 +00:00
Gary D. Gregory 8ba293b934 Add @Test testRemoveAndAddColumns.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1560389 13f79535-47bb-0310-9956-ffa450edef68
2014-01-22 15:49:14 +00:00
Gary D. Gregory e3ffcc5cd7 Add accessor for out ivar.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1560384 13f79535-47bb-0310-9956-ffa450edef68
2014-01-22 15:27:35 +00:00
Gary D. Gregory 58233665d0 Sort methods.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1560382 13f79535-47bb-0310-9956-ffa450edef68
2014-01-22 15:25:22 +00:00
Gary D. Gregory 011510efbd Javdoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1560088 13f79535-47bb-0310-9956-ffa450edef68
2014-01-21 16:51:53 +00:00
Gary D. Gregory 228268310b Javadoc: use the active voice.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1560005 13f79535-47bb-0310-9956-ffa450edef68
2014-01-21 13:35:01 +00:00
Gary D. Gregory 7b27106237 Internal refactoring. If we have a toMap, a toList makes sense (which is already needed internally).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1560003 13f79535-47bb-0310-9956-ffa450edef68
2014-01-21 13:34:34 +00:00
Gary D. Gregory 5f9a1987ff Hide a method.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1560001 13f79535-47bb-0310-9956-ffa450edef68
2014-01-21 13:30:35 +00:00
Gary D. Gregory 59411494e0 Use final.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1559908 13f79535-47bb-0310-9956-ffa450edef68
2014-01-21 02:44:30 +00:00
Gary D. Gregory d01e6b5421 [CSV-105] Add Map conversion API to CSVRecord.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1559905 13f79535-47bb-0310-9956-ffa450edef68
2014-01-21 02:12:02 +00:00
Gary D. Gregory 64de57a0bc Sort members.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1559898 13f79535-47bb-0310-9956-ffa450edef68
2014-01-21 01:55:23 +00:00
Gary D. Gregory 5ec59afdda Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1558889 13f79535-47bb-0310-9956-ffa450edef68
2014-01-16 19:07:07 +00:00
Gary D. Gregory b3553addb7 The local variable record is hiding a field from type CSVParser.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1558888 13f79535-47bb-0310-9956-ffa450edef68
2014-01-16 19:05:43 +00:00
Sebastian Bazley db83d51432 Must not advertise nightly builds to general public
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1526903 13f79535-47bb-0310-9956-ffa450edef68
2013-09-27 13:53:47 +00:00
Sebastian Bazley 28c0a36e24 Maven 2 also works
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1526902 13f79535-47bb-0310-9956-ffa450edef68
2013-09-27 13:52:46 +00:00
Gary D. Gregory 22601f647f [CSV-100] CSVParser: getHeaderMap throws NPE.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1524435 13f79535-47bb-0310-9956-ffa450edef68
2013-09-18 14:57:57 +00:00
Benedikt Ritter 2b5f84ede1 Document how to create CSVParsers via CSVFormat
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1523213 13f79535-47bb-0310-9956-ffa450edef68
2013-09-14 11:13:22 +00:00
Benedikt Ritter 7982e227ae Make CSVFormat final
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1523210 13f79535-47bb-0310-9956-ffa450edef68
2013-09-14 11:03:44 +00:00
Benedikt Ritter 08f1bbf914 Changes in toString broke test cases. Align test data to new toString implementation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522893 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 12:18:52 +00:00
Benedikt Ritter 32e1fb0ce0 Add output of the header array to toString implementation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522890 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 12:11:09 +00:00
Benedikt Ritter 5e0f654e80 Add output of recordSeparator to toString implementation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522887 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 12:02:20 +00:00
Benedikt Ritter 2b54d16e9a Fix typo
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522882 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 11:53:23 +00:00
Benedikt Ritter ef202e7429 Add output of header record skipping to toString implementation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522880 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 11:42:29 +00:00
Benedikt Ritter 65ce9e99ea Add output of the nullString to toString implementation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522879 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 11:39:52 +00:00
Benedikt Ritter 467a504a2d Add method to check if null handling has been defined
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522878 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 11:38:32 +00:00
Benedikt Ritter eda3c7070a Woops, messed up renaming in r1522875. Change type name to match the new file name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522876 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 11:26:59 +00:00
Benedikt Ritter cd02e63c1f CSVLexer has been renamed to Lexer. Rename test the same way
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522875 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 11:25:43 +00:00
Benedikt Ritter 3740067de8 Document contents of headerMap
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522870 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 11:13:27 +00:00
Benedikt Ritter 23898d62e2 Format JavaDoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522865 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 11:01:28 +00:00
Benedikt Ritter cb900843d2 Add heading for notes section
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522864 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 10:56:22 +00:00
Benedikt Ritter 4215230883 CSV content can also be parsed partly into memory, if records have already been consumed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522862 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 10:54:30 +00:00
Benedikt Ritter 497d3cb51a Add documentation about parsing CSV content into memory
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522861 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 10:53:33 +00:00
Benedikt Ritter 8a5f777a0e CSVParser JavaDoc should be about using the CSVParser and not how to customize CSVFormats. Customizing CSVFormats is subject of CSVFormat JavaDoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522836 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 09:44:55 +00:00
Benedikt Ritter ffb63750e2 Use @see tag to link to further documentation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522829 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 09:28:05 +00:00
Benedikt Ritter a12573e717 Add headings for different topics
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522825 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 09:22:33 +00:00
Benedikt Ritter 7ab4840ba4 Creation of CSVParser instances is now documented at the begining of the JavaDoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522824 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 09:14:22 +00:00
Benedikt Ritter e9ff3ef208 Document how to create CSVParser instances
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522823 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 09:07:41 +00:00
Benedikt Ritter ad956f348a Don't use yet another term for format
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522820 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:56:47 +00:00
Benedikt Ritter 196260e8fa Correct indentation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522819 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:52:18 +00:00
Benedikt Ritter e01400d2c6 TDF is also predefined
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522817 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:51:12 +00:00
Benedikt Ritter 20e6c4e617 Use correct return type in JavaDoc - a list is returned, not an array.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522814 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:43:25 +00:00
Benedikt Ritter 1299090016 mvn clean site will not create the jar for you
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522812 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:34:05 +00:00
Benedikt Ritter 46ce06d3ff We are really iterating over records here
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522811 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:29:49 +00:00
Benedikt Ritter 67155b3d52 Add reference to RFC 4180
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522810 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:23:26 +00:00
Benedikt Ritter 0a6f94b2a3 Add alternative abbreviation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522809 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:14:54 +00:00
Benedikt Ritter 10b1110942 Always write 'CSV' in capital letters
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522807 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:09:32 +00:00
Benedikt Ritter c43e8fa5de Remove fallback logic for charset parameter
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1519269 13f79535-47bb-0310-9956-ffa450edef68
2013-09-01 13:36:08 +00:00
Benedikt Ritter 724c88dbec Remove unnecessary generics
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1518974 13f79535-47bb-0310-9956-ffa450edef68
2013-08-30 14:10:49 +00:00
Benedikt Ritter 6c44286b6d Add missing license headers
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1518808 13f79535-47bb-0310-9956-ffa450edef68
2013-08-29 20:25:19 +00:00
Benedikt Ritter a2fef00ab8 Make methods that create parsers or printers fail early and provide an expressive error messages. Document new behavior in JavaDoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1518802 13f79535-47bb-0310-9956-ffa450edef68
2013-08-29 20:18:13 +00:00
Benedikt Ritter 33cf289907 Remove factory methods for creating CSVParsers for classpath resources
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1513994 13f79535-47bb-0310-9956-ffa450edef68
2013-08-14 18:07:13 +00:00
Benedikt Ritter 817561f4d7 Add test that documents behavior of multiple iterators over the same CSVParser.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1513228 13f79535-47bb-0310-9956-ffa450edef68
2013-08-12 19:23:16 +00:00
Benedikt Ritter 5a30b37043 Fix typo
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512650 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 11:46:28 +00:00
Benedikt Ritter 012146e476 Make checkstyle happy: Line was longer than 120 chars
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512626 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 11:08:57 +00:00
Benedikt Ritter e0b79fe691 Make checkstyle happy: Line was longer than 120 chars, file contained tabs
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512625 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 11:07:15 +00:00
Benedikt Ritter 1e70eaaaf4 Make checkstyle happy: remove trailing whitespace
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512624 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 11:05:10 +00:00
Benedikt Ritter 5db1a2c110 Make checkstyle happy: remove trailing white spaces, break line that was longer than 120 chars.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512623 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 11:04:34 +00:00
Benedikt Ritter df7b7d39cc Remove redundant cast
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512622 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:58:42 +00:00
Benedikt Ritter 375b273ced No need for explicitly creating an array. Arrays.asList is a varargs method.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512621 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:57:32 +00:00
Benedikt Ritter c75345870e Fix JavaDoc references
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512620 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:52:09 +00:00
Benedikt Ritter 6b27379c40 Fix JavaDoc references
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512619 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:51:43 +00:00
Benedikt Ritter 4213415b2c Don't make JavaDoc references from production code to test code
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512618 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:49:30 +00:00
Benedikt Ritter 04a2e9ebe4 Remove unused method. It made no sense anyway, since Assert.assertArrayEquals is capable of comparing multi dimensional arrays.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512617 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:46:03 +00:00
Benedikt Ritter 8b74f0aaff Utils class is only used for internal testing, it can be package private. Also make it final since it should not be extended.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512615 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:41:27 +00:00
Benedikt Ritter 06630f4b4b Make members private, they are only needed in this test case
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512614 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:39:48 +00:00
Benedikt Ritter 9631efe688 Methods are no longer used in test code. Make them private.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512610 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:32:19 +00:00
Benedikt Ritter 15b4e3f539 Sort members alphabetically
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512606 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:30:48 +00:00
Benedikt Ritter 1756e67623 Simplify if statements
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512399 13f79535-47bb-0310-9956-ffa450edef68
2013-08-09 17:09:37 +00:00
Benedikt Ritter a223126567 No need to declare private method final
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512398 13f79535-47bb-0310-9956-ffa450edef68
2013-08-09 17:06:48 +00:00
Gary D. Gregory 152d50c4f7 Remove type names from static factory APIs in org.apache.commons.csv.CSVParser.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1511883 13f79535-47bb-0310-9956-ffa450edef68
2013-08-08 17:11:03 +00:00
Gary D. Gregory a36bbffdd3 Remove org.apache.commons.csv.CSVParser.parseString(String).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1511868 13f79535-47bb-0310-9956-ffa450edef68
2013-08-08 16:52:00 +00:00
Gary D. Gregory 65f6f1dfe8 Package private classes are not prefixed with "CSV": CSVLexer -> Lexer.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1511462 13f79535-47bb-0310-9956-ffa450edef68
2013-08-07 20:00:26 +00:00
Benedikt Ritter 643b628af4 Replace tabs with spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1511428 13f79535-47bb-0310-9956-ffa450edef68
2013-08-07 18:25:44 +00:00
Gary D. Gregory 53f83b4f18 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1511039 13f79535-47bb-0310-9956-ffa450edef68
2013-08-06 17:12:26 +00:00
Sebastian Bazley aede94a857 Make fields private
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1511015 13f79535-47bb-0310-9956-ffa450edef68
2013-08-06 16:01:24 +00:00
Sebastian Bazley 7b168ebbbe Merge Lexer with CSVLexer
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1511006 13f79535-47bb-0310-9956-ffa450edef68
2013-08-06 15:44:41 +00:00
Sebastian Bazley 7755640784 No longer wanted
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1511005 13f79535-47bb-0310-9956-ffa450edef68
2013-08-06 15:43:10 +00:00
Gary D. Gregory a064b97305 [CSV-42] Lots of possible changes: Make classes final.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1510761 13f79535-47bb-0310-9956-ffa450edef68
2013-08-05 21:45:01 +00:00
Gary D. Gregory 258387e3ce Use US English spelling of 'recognized'.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1510664 13f79535-47bb-0310-9956-ffa450edef68
2013-08-05 19:10:04 +00:00
Gary D. Gregory ed72da2552 Remove extra semicolon.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1510660 13f79535-47bb-0310-9956-ffa450edef68
2013-08-05 19:03:09 +00:00
Gary D. Gregory b042bd8522 Remove primitive APIs in CSVRecord.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1510455 13f79535-47bb-0310-9956-ffa450edef68
2013-08-05 12:43:23 +00:00
Sebastian Bazley 6208f0c9af Fix up TODOs
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509967 13f79535-47bb-0310-9956-ffa450edef68
2013-08-03 11:59:28 +00:00
Sebastian Bazley 3fd92ec4a4 Use NotEscaped where character has not been escaped
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509966 13f79535-47bb-0310-9956-ffa450edef68
2013-08-03 11:51:21 +00:00
Benedikt Ritter 575c88d8a2 Add some more tests that document escaping behavior
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509957 13f79535-47bb-0310-9956-ffa450edef68
2013-08-03 11:12:48 +00:00
Benedikt Ritter 3178725e98 Align test names to other tests of the same kind
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509956 13f79535-47bb-0310-9956-ffa450edef68
2013-08-03 11:01:36 +00:00
Gary D. Gregory 70485e44f2 Add CSVRecord#getInt(String) API and tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509450 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 21:57:46 +00:00
Gary D. Gregory 4bb75e3edb Add CSVRecord#getLong(String) API and tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509449 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 21:54:37 +00:00
Gary D. Gregory ac03c2eaa7 Simplify tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509446 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 21:51:10 +00:00
Gary D. Gregory 666350b94a Sort members.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509442 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 21:48:39 +00:00
Gary D. Gregory 50b7f79338 CSVRecord.get(String) throws IAE if the column is not mapped (does not exist). This is similar to what JDBC does in ResultSet. Add getBoolean(String) API and tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509431 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 21:11:10 +00:00
Benedikt Ritter 412d05d166 Better throw a NoSuchElementException if no more elements are available because parser has been closed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509395 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 19:41:10 +00:00
Gary D. Gregory 7e63096d47 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509368 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 18:24:37 +00:00
Sebastian Bazley 86d488407b Ensure Closeable is closed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509264 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 14:42:35 +00:00
Sebastian Bazley efdcb376e8 Don't split ternary expression over two lines
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509261 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 14:39:29 +00:00
Sebastian Bazley 4b57058ebb Remove doc for non-existent parameter
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509260 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 14:38:17 +00:00
Sebastian Bazley 105f907767 CSV-78 Use Character instead of char for char fields except delimiter
Already done as part of CSV-99 etc.
Updated Javadoc to clarify that null can be used to disable settings

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509239 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 14:02:20 +00:00
Sebastian Bazley cf764bc9ae Doc tweak
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509232 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 13:45:35 +00:00
Gary D. Gregory 1d767ad946 Sort members.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509231 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 13:43:17 +00:00
Gary D. Gregory f69ddb394a [CSV-99] Revert Builder implementation in CSVFormat. Update Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509216 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 13:05:25 +00:00
Gary D. Gregory fcc0d15c7b - Remove trailing spaces.
- Add missing final keywords.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509069 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 02:04:27 +00:00
Gary D. Gregory 316a51f520 - Add some real world CSV files.
- Add a record API to get column values using an Enum.
- Throw a better exception when a resource is not found in a class loader for the parser.
- Replace some tabs with spaces.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509068 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 02:03:33 +00:00
Gary D. Gregory 816c652997 Better example.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509012 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 20:03:02 +00:00
Benedikt Ritter c0d91d205d Remove copy method. It is not needed since every withXxx() method returns a copy
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508966 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 17:43:14 +00:00
Gary D. Gregory 55eff9dcfa Use ch instead of c as a character var name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508943 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 15:53:05 +00:00
Gary D. Gregory 7909a7c386 Fix boxing and unboxing warnings.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508940 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 15:51:20 +00:00
Gary D. Gregory 2b14b16d4b Fix NPE when format is null.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508938 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 15:48:54 +00:00
Gary D. Gregory a062477946 Use ch instead of c as a character var name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508937 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 15:46:05 +00:00
Gary D. Gregory 9599bfe743 Document empty block. Formatting.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508936 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 15:43:33 +00:00
Gary D. Gregory e33dced746 Document empty block.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508935 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 15:42:36 +00:00
Gary D. Gregory 97d34575a1 Revert back to NOT skipping a record when withHeader is called with a non-empty array. Add skipHeaderRecord setting to CSVFormat and use when headers are initialized.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508933 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 15:39:57 +00:00
Gary D. Gregory e6759b8c10 Sort members.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508635 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 21:24:52 +00:00
Gary D. Gregory f881372d92 Validate that headers do not contain duplicates.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508618 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 20:44:15 +00:00
Gary D. Gregory 3320c53e27 Sort members.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508613 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 20:37:17 +00:00
Gary D. Gregory 1533facb19 When withHeader is set to any non-null value, the first record is the first <em>data</em> record, not the header record.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508612 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 20:36:12 +00:00
Gary D. Gregory 390800f288 Make org.apache.commons.csv.CSVFormat.getHeader() public and make it return a clone.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508585 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 19:32:40 +00:00
Gary D. Gregory 69997467d4 Refactor to only have minimal CSVParser constructors in favor of CSVParser factory methods for String, resource path, URL, and File. Update some tests to use the APIs.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508544 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 17:36:34 +00:00
Gary D. Gregory 61fdb7a03a Sort members.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508511 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 16:26:43 +00:00
Gary D. Gregory 21ed5b135c Better lvar name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508510 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 16:25:30 +00:00
Gary D. Gregory f78b5a14ca Change CSVFormat#Iterable<CSVRecord> parse(final Reader in) to return a CSVParser, which is compatible since CSVParser implements Iterable<CSVRecord>. This allows a caller to end the parsing by calling CSVParser#close() or to use CSVParser in a Java 7 try-with-resources, without tracking a reader or input stream.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508509 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 16:22:07 +00:00
Gary D. Gregory 7af334d7d5 Allow a caller to close the parser before reading all records and free resources. The parser and lexer now implement java.io.Closeable.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508475 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 14:50:42 +00:00
Gary D. Gregory ee7335a2fc [CSV-99] Revert Builder implementation in CSVFormat.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508472 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 14:44:48 +00:00
Gary D. Gregory 75f39a81a7 [CSV-99] Revert Builder implementation in CSVFormat.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508470 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 14:42:32 +00:00
Benedikt Ritter 20721c5a3d Make sure an unmapped header returns null
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1498003 13f79535-47bb-0310-9956-ffa450edef68
2013-06-29 19:04:01 +00:00
Gary D. Gregory 1579c1786a Fix formatting.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1496236 13f79535-47bb-0310-9956-ffa450edef68
2013-06-24 22:18:23 +00:00
Sebastian Bazley d045a45f57 Clarify (hopefully) the Javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1496064 13f79535-47bb-0310-9956-ffa450edef68
2013-06-24 14:22:56 +00:00
Gary D. Gregory df4bd36e7b Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1496024 13f79535-47bb-0310-9956-ffa450edef68
2013-06-24 13:13:57 +00:00
Sebastian Bazley ad0acc17e1 Javadoc fix
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1495965 13f79535-47bb-0310-9956-ffa450edef68
2013-06-24 09:15:27 +00:00
Gary D. Gregory b460ef6200 Add contants for [CSV-51] Support Unicode line separators.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1495914 13f79535-47bb-0310-9956-ffa450edef68
2013-06-24 03:27:03 +00:00
Gary D. Gregory d5cc0d8a7c Replace magic String with constant from Constants.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1495912 13f79535-47bb-0310-9956-ffa450edef68
2013-06-24 03:17:29 +00:00
Gary D. Gregory 5a0894f9e0 [CSV-93] Allow the handling of NULL values. Use a single property 'nullString' for both input and output processing. No substitutions occur if null. For reading, nullString is used to convert field values to null. For writing, nullString is used to output the given string instead of the empty string.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1495911 13f79535-47bb-0310-9956-ffa450edef68
2013-06-24 03:06:05 +00:00
Gary D. Gregory 530b038269 Fix possible NPE reported by FindBugs.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1495269 13f79535-47bb-0310-9956-ffa450edef68
2013-06-21 01:49:03 +00:00
Gary D. Gregory 93a07b9b8f Better param name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1495268 13f79535-47bb-0310-9956-ffa450edef68
2013-06-21 01:46:26 +00:00
Gary D. Gregory ab2e7eb504 - Add final modifier to method parameters.
- Add final modifier to local variables.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1495203 13f79535-47bb-0310-9956-ffa450edef68
2013-06-20 21:39:53 +00:00
Sebastian Bazley c6c762ad9d Checkstyle: put trailing || on previous line (indicates more to come)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1485805 13f79535-47bb-0310-9956-ffa450edef68
2013-05-23 18:21:32 +00:00
Sebastian Bazley e5d7b21456 Checkstyle: trailing spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1485799 13f79535-47bb-0310-9956-ffa450edef68
2013-05-23 18:17:23 +00:00
Sebastian Bazley 512e446d28 Add code and test for Quote.NONE
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1480499 13f79535-47bb-0310-9956-ffa450edef68
2013-05-08 23:54:22 +00:00
Sebastian Bazley bb3bb0d65b Test default Quote policy
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1480498 13f79535-47bb-0310-9956-ffa450edef68
2013-05-08 23:43:14 +00:00
Sebastian Bazley 71c69df6dd CSV-98 Line number counting is confusing
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479936 13f79535-47bb-0310-9956-ffa450edef68
2013-05-07 15:12:48 +00:00
Sebastian Bazley 5b2e5f809b Simplify code so delimiter only printed in one place
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479823 13f79535-47bb-0310-9956-ffa450edef68
2013-05-07 09:09:11 +00:00
Sebastian Bazley 978e5796e2 MOre tests
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479753 13f79535-47bb-0310-9956-ffa450edef68
2013-05-07 02:21:38 +00:00
Sebastian Bazley 0fabee5f24 Add some more tests
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479730 13f79535-47bb-0310-9956-ffa450edef68
2013-05-06 23:54:45 +00:00
Sebastian Bazley 02c1b35939 Document why original object is needed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479721 13f79535-47bb-0310-9956-ffa450edef68
2013-05-06 23:29:45 +00:00
Sebastian Bazley c616a17650 Typo
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479719 13f79535-47bb-0310-9956-ffa450edef68
2013-05-06 23:24:07 +00:00
Sebastian Bazley e697318e68 Fix Javadoc to current behaviour
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479712 13f79535-47bb-0310-9956-ffa450edef68
2013-05-06 23:02:34 +00:00
Sebastian Bazley 4f61bd1aee Extract check for metaChar
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479706 13f79535-47bb-0310-9956-ffa450edef68
2013-05-06 22:38:23 +00:00
Sebastian Bazley 883511fa42 Javadoc fix
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479701 13f79535-47bb-0310-9956-ffa450edef68
2013-05-06 22:18:21 +00:00
Benedikt Ritter e6ba150743 Use isDelimiter method instead of != check.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1478655 13f79535-47bb-0310-9956-ffa450edef68
2013-05-03 06:37:58 +00:00
Sebastian Bazley 2c61208262 CSV-58 Unescape handling needs rethinking
Fixed up most issues.
TODO should TAB, FF and BACKSPACE be un/escaped?

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1478621 13f79535-47bb-0310-9956-ffa450edef68
2013-05-03 01:10:34 +00:00
Sebastian Bazley e31980892c Bug in test case result
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1478619 13f79535-47bb-0310-9956-ffa450edef68
2013-05-03 01:01:20 +00:00
Gary D. Gregory 697a612a89 Remove unused import.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1469437 13f79535-47bb-0310-9956-ffa450edef68
2013-04-18 16:59:44 +00:00
Sebastian Bazley 6640e8597c Standardise on record rather than line; fix incorrect Javadoc comments
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1468827 13f79535-47bb-0310-9956-ffa450edef68
2013-04-17 10:31:57 +00:00
Sebastian Bazley 939a8a04eb Standardise on recordSeparator; fix incorrect Javadoc comments
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1468825 13f79535-47bb-0310-9956-ffa450edef68
2013-04-17 10:28:33 +00:00
Benedikt Ritter f16818b3ba Give tests a better name that expresses, what actually happens
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1467766 13f79535-47bb-0310-9956-ffa450edef68
2013-04-14 11:35:47 +00:00
Benedikt Ritter 04522fbf90 Change JavaDoc to match actual parameter name
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1467666 13f79535-47bb-0310-9956-ffa450edef68
2013-04-13 17:55:16 +00:00
Benedikt Ritter 03fefe8c30 Add missing JavaDoc for parameter
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1467665 13f79535-47bb-0310-9956-ffa450edef68
2013-04-13 17:49:37 +00:00
Benedikt Ritter 7e9b381a6f Document expected result for ignored test
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1466605 13f79535-47bb-0310-9956-ffa450edef68
2013-04-10 18:16:23 +00:00
Benedikt Ritter 16e12d2130 Change wrong input data of test. Test now fails because of CSV-58 and is therefore changed to be @Ignore.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1466604 13f79535-47bb-0310-9956-ffa450edef68
2013-04-10 18:15:36 +00:00
Benedikt Ritter fd8433b711 Give test a better name and remove comment that is now no longer needed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1466601 13f79535-47bb-0310-9956-ffa450edef68
2013-04-10 18:05:31 +00:00
Benedikt Ritter 6c346b143a Give test a better name
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1466591 13f79535-47bb-0310-9956-ffa450edef68
2013-04-10 17:48:28 +00:00
Benedikt Ritter b05af3c049 Add a test that makes sure ignoreSurroundingWhitespaces works for the tab character
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1466590 13f79535-47bb-0310-9956-ffa450edef68
2013-04-10 17:47:42 +00:00
Gary D. Gregory a7e4484db9 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1466223 13f79535-47bb-0310-9956-ffa450edef68
2013-04-09 20:43:29 +00:00
Gary D. Gregory f57afe607e Fix checksyle trailing space.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465774 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 20:41:29 +00:00
Gary D. Gregory 75b9a4ba4e [CSV-97] Allow the String value for null to be customized for the CSV printer.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465768 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 20:34:49 +00:00
Gary D. Gregory 60cc83af7f Sort members, classes and methods (but not fields).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465763 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 20:23:57 +00:00
Gary D. Gregory afc9de71bd Better parameter name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465753 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 19:57:32 +00:00
Benedikt Ritter a0d975933d [CSV-96] CSVRecord does not verify that the length of the header mapping matches the number of values - convert ArrayIndexOutOfBoundsException to IllegalArgumentException to give users a better feedback about what went wrong
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465738 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 19:34:38 +00:00
Benedikt Ritter 5744ee8a16 Separate testing empty line handling from comment recognition
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465722 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 18:55:58 +00:00
Benedikt Ritter 449e9a8cf6 Make sure empty lines are ignored by constructing CSVFormat this way. Remove corresponding assert that would have failed if CSVFormat.newBuilder() was changed to withIgnoreEmptyLines(false)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465718 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 18:37:22 +00:00
Benedikt Ritter 19cb2ca2eb Give test a name that's a bit more expressive and remove comment that is no longer needed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465715 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 18:33:36 +00:00
Benedikt Ritter 7c4121b5e0 Remove comment, intention of test is now expressed in its name
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465709 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 18:27:34 +00:00
Benedikt Ritter 4c8024fb76 Express intention of tokens in token content and give test more structure
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465705 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 18:23:32 +00:00
Benedikt Ritter 1c728b40e5 Give test a name that's a bit more expressive
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465693 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 17:59:02 +00:00
Benedikt Ritter 61a879bf68 Replace assertTokenEquals with Token matcher
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465692 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 17:49:51 +00:00
Benedikt Ritter 4b5e8d70f1 Remove unneeded empty line
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465441 13f79535-47bb-0310-9956-ffa450edef68
2013-04-07 18:38:56 +00:00
Benedikt Ritter 759596a54a Correct JavaDoc indentation, remove trailing white spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465439 13f79535-47bb-0310-9956-ffa450edef68
2013-04-07 18:13:36 +00:00
Benedikt Ritter c694d060bd Add missing white spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1463212 13f79535-47bb-0310-9956-ffa450edef68
2013-04-01 17:24:43 +00:00
Benedikt Ritter 09a6e887b8 Use hasContent matcher token type is not relevant (correct token type recognition is tested by other tests methods)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1463210 13f79535-47bb-0310-9956-ffa450edef68
2013-04-01 17:15:31 +00:00
Benedikt Ritter aef71309b6 Add some matcher implementations as discussed on the ML http://markmail.org/message/k7gzqhbgfyiszyph
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1463207 13f79535-47bb-0310-9956-ffa450edef68
2013-04-01 17:09:24 +00:00
Gary D. Gregory 8f436552ae [CSV-96] CSVRecord does not verify that the length of the header mapping matches the number of values.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1462110 13f79535-47bb-0310-9956-ffa450edef68
2013-03-28 14:23:56 +00:00
Gary D. Gregory 08f02a086c Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1462086 13f79535-47bb-0310-9956-ffa450edef68
2013-03-28 13:29:36 +00:00
Gary D. Gregory 83ad716bc2 Add a 'using' section to the main page with a short code example and pointers to the Javadoc. Move the "About" section to the end and remove broken package reference.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461338 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 22:12:57 +00:00
Gary D. Gregory 4c530ac40d Better lvar name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461307 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 20:52:28 +00:00
Gary D. Gregory 78d7055f71 Minor clean ups.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461302 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 20:46:11 +00:00
Gary D. Gregory 6f1db38058 Better param name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461241 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 17:49:05 +00:00
Gary D. Gregory d10442b68a Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461240 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 17:48:22 +00:00