Commit Graph

1505 Commits

Author SHA1 Message Date
Alex Herbert bd48a767cd CSVFormat: Sanitise empty headers to the empty string ""
Add more tests for duplicate headers including null header names.
2022-10-23 19:37:32 +01:00
Gary Gregory de47291978 Test for empty/blank headers the same way for input and output 2022-10-23 09:09:26 -04:00
Gary Gregory b6c63e47d9 Update test case for cases that are only supported for parsing 2022-10-22 15:04:12 -04:00
Alex Herbert 4ddeddc2a1 Test javadoc updates and typos 2022-10-22 18:45:45 +01:00
Alex Herbert 1c0a8f12e6 Fix typo 2022-10-22 18:39:16 +01:00
Alex Herbert 24ffa7b4cf Add test for duplicate header names
Test the CSVFormat and CSVParser handle the headers consistently.

CSVParser handles all 36 cases.

CSFFormat fails 6 cases. These are currently disabled.
2022-10-22 18:23:31 +01:00
Gary Gregory 8d57c918ff Bump mockito-core from 4.8.0 to 4.8.1 2022-10-22 08:54:13 -04:00
Gary Gregory 3992019933 Javadoc and format tweaks 2022-10-22 08:52:41 -04:00
Gary Gregory 289ffa1627 Validates that a CSVFormat rejects empty header names 2022-10-22 08:38:52 -04:00
Gary Gregory 8fbf1b1acf Explicitly test a method JaCoCo says is not tested but should be 2022-10-22 07:50:16 -04:00
Alex Herbert 375cefcfe0 Add missing @Test annotations 2022-10-21 16:51:54 +01:00
Gary Gregory b4799e799a Add testGetDuplicateHeaderMode() 2022-10-21 08:59:14 -04:00
Gary Gregory db16af9106 Sort member 2022-10-21 08:55:26 -04:00
Gary Gregory d19e44c88f Fill in the test coverage for getAllowDuplicateHeaderNames() to reflect
the _current_ behavior, right or wrong.
2022-10-21 08:17:15 -04:00
Gary Gregory 4e4f27029c Inline single use variable 2022-10-21 08:06:25 -04:00
Gary Gregory da8bad9df0 Bump CSVFormat#serialVersionUID from 1 to 2
Javadoc Serialization in CSVFormat is not supported from one version to
the next.
2022-10-21 07:53:48 -04:00
Gary Gregory 669a2ca2b0 Add/fix missing Javadoc since tag 2022-10-16 13:44:28 -04:00
Gary Gregory 2d11aab733 Fix since tag 2022-10-16 13:42:00 -04:00
Gary Gregory 72ba42e3e7 Add missing code coverage 2022-10-16 13:41:47 -04:00
Gary Gregory 9134e957c0 Fix formatting 2022-10-16 13:35:34 -04:00
Gary Gregory fc2848b025 Enable some CSVPrinterTest tests
* testJira135_part1
* testJira135_part3
* testRandomPostgreSqlText
2022-10-16 13:27:10 -04:00
Gary Gregory 5433169b79 Enable JiraCsv213Test 2022-10-16 13:21:20 -04:00
Gary Gregory 7d862e6d6c Remove deprecated PMD rules. 2022-10-16 12:56:02 -04:00
Gary Gregory 6aa3665d93 Only link to dependency-info.html instead of hard-coding a single method 2022-10-16 12:51:40 -04:00
Gary Gregory dc786a4cf5 Prepare release candidate 2022-10-16 08:16:22 -04:00
Gary Gregory 6fce181abf Refactor duplicate code
Normalize Javadoc first word
2022-10-16 08:03:47 -04:00
Gary Gregory 0047fb0a65 Refactor code duplication in tests 2022-10-15 10:31:17 -04:00
Gary Gregory 6293899720 Simplify test 2022-10-15 10:22:34 -04:00
Gary Gregory 989116cdb1 Use final
Remove unused imports
2022-10-15 10:16:32 -04:00
Gary Gregory 22df0e28c4 Fix Javadoc links 2022-10-15 10:12:39 -04:00
Gary Gregory 57ab1981ea Normalize first word of Javadocs
- "getFoo" methods "Gets foo"
- "isFoo" methods "Tests foo"
2022-10-15 09:42:41 -04:00
Gary Gregory c04fc6c022 Javadoc: Add missing since tag 2022-10-15 09:41:01 -04:00
Gary Gregory c4cf4078d0 Validate input to setDelimiter(String) for empty string #266. 2022-10-15 09:40:04 -04:00
Gary Gregory 23c39b158e
Merge pull request #266 from mykolaf/delimcheck
Validate input to setDelimiter(String) for empty string
2022-10-15 09:39:04 -04:00
Gary Gregory 550309e327
CSV-290 - Fix the wrong assumptions in PostgreSQL formats #265 2022-10-15 09:36:24 -04:00
Gary Gregory 41a063d2cf
Merge pull request #265 from angusdev/CSV-290
CSV-290 - Fix the wrong assumptions in PostgreSQL formats
2022-10-15 09:34:12 -04:00
Gary Gregory 85330590d7
Bump spotbugs-maven-plugin from 4.7.2.0 to 4.7.2.1 #275 2022-10-14 09:00:09 -04:00
Gary Gregory 76b4637c68
Bump actions/cache from 3.0.9 to 3.0.10 #271 2022-10-07 10:56:27 -04:00
Gary Gregory a61afc1618
[CSV-274] Add comments to iterator() and stream() #270 2022-10-07 10:50:26 -04:00
Gary Gregory d46919da26
Merge pull request #270 from pedro-w/csv-274-documentation
[CSV-274] Add comments to iterator() and stream()
2022-10-07 10:49:28 -04:00
Gary Gregory 221f5c418b
Bump actions/checkout from 3.0.2 to 3.1.0 #272 2022-10-07 10:47:53 -04:00
Gary Gregory a2a7537ffc
Bump commons.pmd-impl.version from 6.49.0 to 6.50.0 #273 2022-10-07 10:47:19 -04:00
Peter Hull 5fbd353856
Update text as requested in review 2022-10-06 13:09:02 +01:00
Gary Gregory af42c835b5 Use Java 8 API 2022-10-05 20:45:59 -04:00
Peter Hull 389cf0047a Add comments to iterator() and stream() 2022-10-05 20:56:09 +01:00
Gary Gregory f36e0f590b Bump actions/setup-java from 3 to 3.5.1 2022-10-01 14:36:48 -04:00
Gary Gregory 6e5517300d
Bump actions/cache from 3.0.8 to 3.0.9 #267 2022-09-30 09:42:24 -04:00
Mykola Faryma 1da75703a4 Check setDelimiter() for empty string
Signed-off-by: Mykola Faryma <m.faryma@partner.samsung.com>
2022-09-27 13:10:43 +03:00
Angus 1ad309fade Add test for tab characters (ASCII 9) in values 2022-09-26 22:22:51 +01:00
Angus b7a9d4084e CSV-290 - Fix the wrong assumptions in PostgreSQL formats
CSVFormat.POSTGRESQL_CSV - special characters are not escaped.
CSVFormat.POSTGRESQL_TEXT - values are not quoted.
2022-09-25 22:48:54 +01:00