Gary Gregory [Sat, 18 Jan 2020 16:55:06 +0000 (11:55 -0500)]
Update POM version numbers for Apache Commons CSV release 1.8
Gary Gregory [Sat, 18 Jan 2020 16:51:38 +0000 (11:51 -0500)]
Prepare for the next release.
Gary Gregory [Sat, 18 Jan 2020 16:35:47 +0000 (11:35 -0500)]
Prepare for the next release.
Gary Gregory [Sat, 18 Jan 2020 16:33:16 +0000 (11:33 -0500)]
Prepare for the next release.
Gary Gregory [Sat, 18 Jan 2020 16:32:40 +0000 (11:32 -0500)]
Fix Checkstyle line length.
Gary Gregory [Mon, 30 Dec 2019 13:45:23 +0000 (08:45 -0500)]
Fix typos in site and test #53.
Chen [Mon, 30 Dec 2019 13:43:55 +0000 (21:43 +0800)]
Fix typos in site and test #53
Gary Gregory [Wed, 25 Dec 2019 22:15:39 +0000 (17:15 -0500)]
[CSV-255] Add CSVRecord.isSet(int) method #52.
Less cryptic parameter name.
Gary Gregory [Wed, 25 Dec 2019 22:14:58 +0000 (17:14 -0500)]
[CSV-255] Add CSVRecord.isSet(int) method #52.
0x100 [Wed, 25 Dec 2019 22:12:05 +0000 (01:12 +0300)]
Add CSVRecord.isSet(int) method (#52)
* Add CSVRecord.isSet(int) method
* Remove unnecessary unboxing
* Revert: Remove unnecessary unboxing
Gary Gregory [Wed, 25 Dec 2019 15:29:11 +0000 (10:29 -0500)]
Add GitHub Action build.
Gary Gregory [Sat, 21 Dec 2019 03:55:16 +0000 (22:55 -0500)]
Fix typo.
Gary Gregory [Sat, 21 Dec 2019 03:54:11 +0000 (22:54 -0500)]
Update tests from Mockito 3.2.0 to 3.2.4.
Gary Gregory [Wed, 18 Dec 2019 21:04:03 +0000 (16:04 -0500)]
Remove unnecessary array creation for varargs.
Gary Gregory [Wed, 18 Dec 2019 20:29:20 +0000 (15:29 -0500)]
Remove trailing white spaces on all lines.
Gary Gregory [Thu, 12 Dec 2019 16:04:02 +0000 (11:04 -0500)]
Update tests from Mockito 3.1.0 to 3.2.0.
Gary Gregory [Thu, 12 Dec 2019 16:02:35 +0000 (11:02 -0500)]
Update tests from Hamcrest 2.1 to 2.2.
Gary Gregory [Thu, 12 Dec 2019 15:59:50 +0000 (10:59 -0500)]
Update tests from H2 1.4.199 to 1.4.200.
Gary Gregory [Tue, 10 Dec 2019 05:21:22 +0000 (00:21 -0500)]
Javadoc: Replace <code></code> HTML tags with Javadoc {@code} notation.
Gary Gregory [Mon, 7 Oct 2019 17:09:03 +0000 (13:09 -0400)]
[CSV-247] A single empty header is allowed when not allowing empty
column headers. #47.</action>
Alex Herbert [Mon, 7 Oct 2019 17:06:11 +0000 (18:06 +0100)]
CSV-247: CSVParser to check an empty header before checking duplicates. (#47)
This updates the issues test for CSV-247 and adds tests to the
CSVParserTest.
aherbert [Mon, 7 Oct 2019 12:01:51 +0000 (13:01 +0100)]
Rename typo in issues file names from cvs to csv.
Gary Gregory [Sun, 6 Oct 2019 21:36:26 +0000 (17:36 -0400)]
[CSV-247] A single empty header is allowed when not allowing empty
column headers.
Add test case.
Gary Gregory [Sun, 6 Oct 2019 21:24:24 +0000 (17:24 -0400)]
No need for all the whitespace.
Gary Gregory [Sun, 6 Oct 2019 18:40:24 +0000 (14:40 -0400)]
Clean ups.
Gary Gregory [Sun, 6 Oct 2019 12:17:12 +0000 (08:17 -0400)]
[CSV-252] Upgrade test framework to JUnit 5 Jupiter #49, #50.
Allon Murienik [Sun, 6 Oct 2019 12:16:08 +0000 (15:16 +0300)]
CSV-252: Clean up exception handling (#50)
* CSV-252: Clean up assertions using assertThrows
As a followup to commit
e2f0a4d8a83a41eaa984086636a3712c682307ea that
introduced JUnit Jupiter to the project, this patch leverages the new
Assertions#assertThrows method to clean up tests for expected
exceptions.
Instead of the somewhat clunky structure common in JUnit 4 tests:
```
try {
someMethod();
fail("SomeException should be thrown");
} catch (SomeException e) {
// Expected...
// Possibly some assertion on e
}
```
JUnit Jupiter allows the following elegant syntax:
```
SomeException e = assertThrows(SomeException.class, () -> someMethod());
// Possibly some assertions on e
```
* CSV-252: Remove redundant throws clauses from tests
Gary Gregory [Sat, 5 Oct 2019 19:04:39 +0000 (15:04 -0400)]
[CSV-252] JUnit 5 Jupiter #49.
Allon Murienik [Sat, 5 Oct 2019 18:59:58 +0000 (21:59 +0300)]
CSV-252: Migration to JUnit Jupiter (#49)
* CSV-252 Stop using junit.framework.TestCase
junit.framework.TestCase is a class from JUnit 3, and while it is not
officially deprecated, it's discouraged to use it.
This patch removes the single use of
junit.framework.TestCase#assertNull, and replaces it with the
standard, recommended, org.junit.Assert#assertNull.
* CSV-252 Standardize org.junit.Assert imports
Code in the project uses org.junit.Assert's methods in two ways:
1. By statically importing them
2. By importing the class and using its methods
Option 1 seems to be the de-facto standard, with just a handful of
cases using Option 2.
This patch standardizes these cases to also use static imports thus
making the code look more uniform, and easier to maintain.
* CSV-252 Upgrade Mockito to 3.1.0
Upgrade the Mockito dependency to the latest available version, 3.1.0,
in order to facilitate an upgrade to JUnit Jupiter.
* CSV-252 JUnit Jupiter upgrade
This patch upgrades the project's testing framework from JUnit 4.12
to the modern JUnit Jupiter 5.5.4.
Since JUnit 5 Jupiter is not backwards compatible to JUnit 4.x (or
even JUnit Vintage), this patch is a bit large, even though a lot of
the changes are merely cosmetic (such as changing the argument order,
see details below). In order to make the reviewer's task as easy as
possible, this PR does not presume to use JUnit Jupiter's best
practices and all its new functionality, but only to migrate the
existing tests with as little change as possible. Following patches
may want to improve the tests by using some of JUnit Jupiter's new
features.
This patch includes the following changes:
1. Maven dependency changes:
a. junit:junit was replaced with org.junit.jupiter:junit-jupiter.
b. org.hamcrest:hamcrest was introduced as an explicit dependency,
since the project uses Hamcrest, and JUnit Jupiter does not
bundle Hamcrest, unlike JUnit 4.x.
2. Annotations:
a. org.junit.jupiter.api.Test was used as a drop in replacement for
org.juit.Test without arguments. See 3.ii. for handling of @Test
annotations with an "expected" argument.
b. org.junit.jupiter.api.BeforeEach was used as an drop in
replacement for org.junit.Before.
c. org.junit.jupiter.api.BeforeAll was used as an drop in
replacement for org.junit.BeforeClass.
d. org.junit.jupiter.api.Disabled was used as a drop in replacement
for org.junit.Ignore.
3. Assertions:
a. org.junit.jupiter.api.Assertions' methods were used as drop in
replacements for org.junit.Assert's methods with the same name in
the simple case of an assertion without a message. In the case of
an assertion with a message, org.junit.jupiter.api.Assertions'
methods were used, but the argument order was changed - Assert's
methods take the message as the first argument, while Assertions'
methods take the message as the last argument.
b. org.junit.jupiter.api.Assertions#assertThrows was used to assert
that a specific exception was throws instead of an org.junit.Test
annotation with an expected argument. This technique has a couple
of side bonuses. First, it makes the tests slightly stricter, as
now they can assert the exception was thrown from a specific line
and prevent false positives where the test's "set-up" code
accidentally threw that exception. Second, it clarifies that some
of the test code is unreachable (as a previous line already
throws an exception), and can safely be removed in order to clean
up the test. The throws clauses of these methods were cleaned up
from exceptions that can no longer be thrown in order to avoid
compilation warnings.
c. org.hamcrest.MatcherAssert#assertThat was used as a drop in
replacement for org.junit.Assert#assertThat.
4. Specific Changes:
a. CSVFileParserTest was rewritten with JUnit Jupiter's
org.junit.jupiter.api.ParameterizedTest. Unlike JUnit 4's
org.junit.runners.Parameterized, it cannot be used to inject
arguments to a test's construct, and so the test can't be
stateful. Instead, it was rewritten so every test receives the
file as a parameter, and opens a reader on it itself. As a side
bonus, this design makes it easier to close the reader and avoid
leaving open file descriptors like the original test did.
Gary Gregory [Sat, 28 Sep 2019 17:09:11 +0000 (13:09 -0400)]
[CSV-249] ArrayIndexOutOfBoundsException when trying to read record
written by CSVPrinter using CSVParser with same format.
Add passing test.
Gary Gregory [Sat, 28 Sep 2019 17:08:56 +0000 (13:08 -0400)]
[CSV-249] ArrayIndexOutOfBoundsException when trying to read record
written by CSVPrinter using CSVParser with same format.
Add passing test.
Gary Gregory [Fri, 13 Sep 2019 00:58:07 +0000 (20:58 -0400)]
More lambdas, less boilerplate.
Gary Gregory [Tue, 10 Sep 2019 00:41:53 +0000 (20:41 -0400)]
Update properties for the next release.
Gary Gregory [Tue, 10 Sep 2019 00:41:07 +0000 (20:41 -0400)]
Revert change to commons.componentid.
Gary Gregory [Mon, 9 Sep 2019 19:26:04 +0000 (15:26 -0400)]
Point to the Java 8 Javadocs.
Gary Gregory [Mon, 9 Sep 2019 19:20:36 +0000 (15:20 -0400)]
Set component ID to commons-csv.
Gary Gregory [Wed, 4 Sep 2019 14:32:51 +0000 (10:32 -0400)]
Sort members.
Gary Gregory [Wed, 4 Sep 2019 13:54:49 +0000 (09:54 -0400)]
[CSV-236] Allow duplicate headers in CSV File.
Add test.
Gary Gregory [Wed, 4 Sep 2019 13:54:03 +0000 (09:54 -0400)]
Sort members.
Sebb [Fri, 16 Aug 2019 17:34:19 +0000 (18:34 +0100)]
git-wip-us => gitbox
Gary Gregory [Wed, 14 Aug 2019 18:39:22 +0000 (11:39 -0700)]
Use test scope for supercsv #48.
sullis [Wed, 14 Aug 2019 18:38:10 +0000 (14:38 -0400)]
use [test] scope for supercsv (#48)
Gary Gregory [Wed, 14 Aug 2019 18:37:52 +0000 (11:37 -0700)]
Drop Oracle JDK 8 since it is not supported anymore.
Gary Gregory [Sun, 21 Jul 2019 20:50:43 +0000 (16:50 -0400)]
Fix the site's source repository link.
Gary Gregory [Sun, 7 Jul 2019 14:31:08 +0000 (10:31 -0400)]
Replace SVN with GitBox URL.
Gary Gregory [Sun, 7 Jul 2019 00:59:49 +0000 (20:59 -0400)]
Use HTTPS to access Apache resources.
Gary Gregory [Sun, 7 Jul 2019 00:41:48 +0000 (20:41 -0400)]
Use HTTPS to access Apache resources.
Gary Gregory [Thu, 4 Jul 2019 14:00:21 +0000 (10:00 -0400)]
Use HTTPS links to Apache.
Sebb [Sun, 16 Jun 2019 20:24:26 +0000 (21:24 +0100)]
CSV-135 - Char escape doesn't work properly with quoting
Sebb [Sun, 16 Jun 2019 20:16:17 +0000 (21:16 +0100)]
CSV-135 - Char escape doesn't work
Ensure escape chars are escaped when using quote mode
Sebb [Sun, 16 Jun 2019 16:07:02 +0000 (17:07 +0100)]
Show quote mode if not null
Sebb [Sun, 16 Jun 2019 12:44:04 +0000 (13:44 +0100)]
CSV235 - WRONG Implementation for RFC4180
Show that implementation is actually correct
Sebb [Sun, 16 Jun 2019 11:51:00 +0000 (12:51 +0100)]
CSV-243 CSVFormat withTrim() and withIgnoreSurroundingSpaces()
need better docs
Gary Gregory [Sat, 15 Jun 2019 17:55:50 +0000 (13:55 -0400)]
[CSV-245] Post 1.7 release fixes.
Alex Herbert [Sat, 15 Jun 2019 17:52:44 +0000 (18:52 +0100)]
Post release fixes (#44)
* Fix checkstyle: remove tabs
* Fix checkstyle: Split long line
* Fix checkstyle: exclude pom.properties
* Update findbugs to allow deliberate fall-through
* Fix pmd: Remove ternary operator returning false
* Fix pmd: Remove implicit final
* Fix pmd: Ignore TooManyStaticImports.
This requires adding the default ruleset and then modifying with
suppressions.
* Add tests to cover use of the IOUtils class.
Requires the CSVFormat to have no quote or escape character, and the
formatted value to be a java.io.Reader.
* Clean-up findbugs exclude filter.
* Removed unused import
* Updated test comments for print tests targeting IOUtils.
* Fix checkstyle: Suppress line length warning in CSVParser.
Sebb [Sat, 15 Jun 2019 13:29:30 +0000 (14:29 +0100)]
CSV-244 Test case failures following CSVFormat#equals() update
Gary Gregory [Sat, 15 Jun 2019 00:24:59 +0000 (20:24 -0400)]
Javadoc.
Gary Gregory [Sat, 15 Jun 2019 00:24:15 +0000 (20:24 -0400)]
Fix odd local variable names.
Gary Gregory [Sat, 15 Jun 2019 00:19:22 +0000 (20:19 -0400)]
End descriptions with a period.
Sebb [Fri, 14 Jun 2019 21:56:30 +0000 (22:56 +0100)]
CSV-243 CSVFormat withTrim() and withIgnoreSurroundingSpaces()
need better docs
Sebb [Fri, 14 Jun 2019 21:52:41 +0000 (22:52 +0100)]
Typo
Sebb [Fri, 14 Jun 2019 16:22:32 +0000 (17:22 +0100)]
Wrong method name
Sebb [Fri, 14 Jun 2019 16:21:33 +0000 (17:21 +0100)]
CSV-242 CSVFormat equals() and hashCode() don't use all fields
Fix hashCode()
Sebb [Fri, 14 Jun 2019 16:14:54 +0000 (17:14 +0100)]
Document change to test behaviour
Sebb [Fri, 14 Jun 2019 15:32:45 +0000 (16:32 +0100)]
CSV-242 CSVFormat equals() and hash() don't use all fields
Fix equals()
TODO fix hash()
Gary Gregory [Thu, 6 Jun 2019 14:02:39 +0000 (10:02 -0400)]
Name "Apache Commons" in page title.
Gary Gregory [Wed, 5 Jun 2019 22:03:25 +0000 (18:03 -0400)]
[CSV-241] CSVFormat#valiadte() does not account for
llowDuplicateHeaderNames.
Applying a different version of the GitHub patch with adjustments to the
tests. Also remove trailing whitespace from CSVRecord.
Closes #43.
Gary Gregory [Wed, 5 Jun 2019 12:29:56 +0000 (08:29 -0400)]
Bump to next development version
Gary Gregory [Sun, 2 Jun 2019 00:09:24 +0000 (20:09 -0400)]
Update POM version numbers for Apache Commons CSV release 1.7
Gary Gregory [Sat, 1 Jun 2019 21:20:20 +0000 (17:20 -0400)]
Prepare for release 1.7.
- There is no longer site archives. We forgot to do it for 1.6 but the
sites are still in svn.
- The Javadoc archives now point to the same place GitHub uses:
javadoc.io
- Checkstyle fixes.
Gary Gregory [Sat, 1 Jun 2019 19:16:59 +0000 (15:16 -0400)]
Add @since 1.7.
Gary Gregory [Sat, 1 Jun 2019 12:37:52 +0000 (08:37 -0400)]
Fix typo.
Gary Gregory [Thu, 30 May 2019 20:44:42 +0000 (16:44 -0400)]
Camel-case name.
Gary Gregory [Wed, 29 May 2019 03:47:29 +0000 (23:47 -0400)]
Javadoc: Add missing @since 1.7.
Gary Gregory [Wed, 29 May 2019 03:46:36 +0000 (23:46 -0400)]
Add missing Javadoc tag.
Gary Gregory [Wed, 29 May 2019 03:45:25 +0000 (23:45 -0400)]
Standardize on US spelling of "behavior".
Dave Moten [Mon, 27 May 2019 22:17:26 +0000 (08:17 +1000)]
[CSV-239] Add javadoc to CSVFormat (#42)
Gary Gregory [Mon, 27 May 2019 12:10:35 +0000 (08:10 -0400)]
Sort methods.
Gary Gregory [Mon, 27 May 2019 12:04:32 +0000 (08:04 -0400)]
Be quiet on the console.
Gary Gregory [Fri, 24 May 2019 12:21:21 +0000 (08:21 -0400)]
- Remove unused import.
- Remove trailing white spaces on all lines.
- Use final.
- Use for-each (in test).
- Use try-with-resources (in test).
- Document empty blocks.
Dave Moten [Fri, 24 May 2019 12:11:17 +0000 (22:11 +1000)]
[CSV-239] Add CSVRecord.getHeaderNames and allow duplicate headers (#41)
* [CSV-239] Cannot get headers in column order from CSVRecord.
* getHeaderNames returns all headers in column order including repeats which are allowed as per RFC 4180
* add CSVFormat.withAllowDuplicateHeaderNames()
* [CSV-239] Cannot get headers in column order from CSVRecord.
* only wrap headerNames with unmodifiableList if non-empty
* fix and enhance CSVRecord.toMap javadoc
* [CSV-239] Cannot get headers in column order from CSVRecord.
* fix exception messages
* [CSV-239] Cannot get headers in column order from CSVRecord.
* fix whitespace
* [CSV-239] Cannot get headers in column order from CSVRecord.
* simplify if statement
* [CSV-239] Cannot get headers in column order from CSVRecord.
* fix indentation
* add javadoc to Headers class
* rename method to createHeaders
* use String.format to build error message
* initialize header names List with appropriate size
Gary Gregory [Tue, 21 May 2019 00:08:08 +0000 (20:08 -0400)]
[CSV-239] Cannot get headers in column order from CSVRecord.
Undo previous change.
Gary Gregory [Mon, 20 May 2019 23:53:15 +0000 (19:53 -0400)]
[CSV-239] Cannot get headers in column order from CSVRecord.
CSVParser.createHeaderNames(Map<String, Integer>) -> private and
instance side.
Gary Gregory [Mon, 20 May 2019 23:51:21 +0000 (19:51 -0400)]
[CSV-239] Cannot get headers in column order from CSVRecord.
Rename CSVRecord.getCSVParser() -> getParser().
Gary Gregory [Mon, 20 May 2019 12:27:36 +0000 (08:27 -0400)]
Fix warning reported by 'mvn versions:display-plugin-updates'
Gary Gregory [Mon, 20 May 2019 12:25:08 +0000 (08:25 -0400)]
Fix warning reported by 'mvn versions:display-plugin-updates'
Gary Gregory [Mon, 20 May 2019 12:21:43 +0000 (08:21 -0400)]
javancss-maven-plugin blows up, drop it.
Gary Gregory [Mon, 20 May 2019 12:14:35 +0000 (08:14 -0400)]
[CSV-239] Cannot get headers in column order from CSVRecord.
Add test.
Gary Gregory [Mon, 20 May 2019 12:10:49 +0000 (08:10 -0400)]
[CSV-239] Cannot get headers in column order from CSVRecord.
- Redo header names as an read-only list.
Gary Gregory [Sun, 19 May 2019 23:50:41 +0000 (19:50 -0400)]
Remove unused import.
Gary Gregory [Sun, 19 May 2019 23:49:23 +0000 (19:49 -0400)]
[CSV-239] Cannot get headers in column order from CSVRecord.
- Redo so that the record tracks its source parser where call sites can
find metadata. This avoids adding slots to the record class itself.
Gary Gregory [Sun, 19 May 2019 22:55:22 +0000 (18:55 -0400)]
Sort methods.
Gary Gregory [Sun, 19 May 2019 14:26:27 +0000 (10:26 -0400)]
[CSV-239] Cannot get headers in column order from CSVRecord.
Gary Gregory [Sun, 19 May 2019 13:32:46 +0000 (09:32 -0400)]
[CSV-239] Cannot get headers in column order from CSVRecord.
Some NPE-proofing.
Gary Gregory [Sun, 19 May 2019 13:25:02 +0000 (09:25 -0400)]
Better method name.
Gary Gregory [Tue, 23 Apr 2019 20:02:26 +0000 (16:02 -0400)]
Update maven-pmd-plugin from 3.11.0 to 3.12.0.
Gary Gregory [Tue, 16 Apr 2019 13:14:09 +0000 (09:14 -0400)]
Add OpenJDK 12 to Travis builds.
Gary Gregory [Mon, 15 Apr 2019 00:26:30 +0000 (20:26 -0400)]
Update tests from Apache Commmons Lang 3.8.1 to 3.9.
Gary Gregory [Mon, 25 Mar 2019 16:00:31 +0000 (12:00 -0400)]
Update Apache Commons Parent from 47 to 48.
Gary Gregory [Fri, 22 Mar 2019 19:20:01 +0000 (15:20 -0400)]
Update Travis build with current JDKs.