svn commit: r1841400 - in /commons/proper/vfs/trunk: commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java src/changes/changes.xml
Author: ggregory Date: Wed Sep 19 22:34:40 2018 New Revision: 1841400 URL: http://svn.apache.org/viewvc?rev=1841400=rev Log: [VFS-675] NullPointerException at AbstractFileObject.java:221. Modified: commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java commons/proper/vfs/trunk/src/changes/changes.xml Modified: commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java?rev=1841400=1841399=1841400=diff == --- commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java (original) +++ commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java Wed Sep 19 22:34:40 2018 @@ -214,26 +214,28 @@ public abstract class AbstractFileObject @Override public void close() throws FileSystemException { FileSystemException exc = null; + +synchronized (fs) { +// Close the content +if (content != null) { +try { +content.close(); +content = null; +} catch (final FileSystemException e) { +exc = e; +} +} -// Close the content -if (content != null) { +// Detach from the file try { -content.close(); -content = null; -} catch (final FileSystemException e) { -exc = e; +detach(); +} catch (final Exception e) { +exc = new FileSystemException("vfs.provider/close.error", fileName, e); } -} -// Detach from the file -try { -detach(); -} catch (final Exception e) { -exc = new FileSystemException("vfs.provider/close.error", fileName, e); -} - -if (exc != null) { -throw exc; +if (exc != null) { +throw exc; +} } } Modified: commons/proper/vfs/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/src/changes/changes.xml?rev=1841400=1841399=1841400=diff == --- commons/proper/vfs/trunk/src/changes/changes.xml (original) +++ commons/proper/vfs/trunk/src/changes/changes.xml Wed Sep 19 22:34:40 2018 @@ -89,6 +89,9 @@ The type attribute can be add,u Update Apache Commons Compress from 1.16.1 to 1.18. + +NullPointerException at AbstractFileObject.java:221. +
svn commit: r1841363 - in /commons/proper/daemon/trunk/src: changes/changes.xml native/windows/src/registry.c
Author: ggregory Date: Wed Sep 19 18:49:37 2018 New Revision: 1841363 URL: http://svn.apache.org/viewvc?rev=1841363=rev Log: [DAEMON-392] Undefined behaviour in registry.c dwRegKey = dwRegKey++ Modified: commons/proper/daemon/trunk/src/changes/changes.xml commons/proper/daemon/trunk/src/native/windows/src/registry.c Modified: commons/proper/daemon/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/changes/changes.xml?rev=1841363=1841362=1841363=diff == --- commons/proper/daemon/trunk/src/changes/changes.xml (original) +++ commons/proper/daemon/trunk/src/changes/changes.xml Wed Sep 19 18:49:37 2018 @@ -55,6 +55,9 @@ Revered code comments for JRE and JDK locations in the registry. + +Undefined behaviour in registry.c dwRegKey = dwRegKey++ + Modified: commons/proper/daemon/trunk/src/native/windows/src/registry.c URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/src/registry.c?rev=1841363=1841362=1841363=diff == --- commons/proper/daemon/trunk/src/native/windows/src/registry.c (original) +++ commons/proper/daemon/trunk/src/native/windows/src/registry.c Wed Sep 19 18:49:37 2018 @@ -779,7 +779,7 @@ LPWSTR apxGetJavaSoftHome(APXHANDLE hPoo lstrcpyW(wsBuf, JRE_REGKEYS[dwRegKey]); else lstrcpyW(wsBuf, JDK_REGKEYS[dwRegKey]); -dwRegKey = dwRegKey++; +dwRegKey++; dwLen = lstrlenW(wsBuf); off = [dwLen]; dwLen = SIZ_RESMAX;
svn commit: r1841361 - in /commons/proper/daemon/trunk/src: changes/changes.xml native/windows/src/registry.c
Author: ggregory Date: Wed Sep 19 18:15:55 2018 New Revision: 1841361 URL: http://svn.apache.org/viewvc?rev=1841361=rev Log: [DAEMON-393] Revered code comments for JRE and JDK locations in the registry. Modified: commons/proper/daemon/trunk/src/changes/changes.xml commons/proper/daemon/trunk/src/native/windows/src/registry.c Modified: commons/proper/daemon/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/changes/changes.xml?rev=1841361=1841360=1841361=diff == --- commons/proper/daemon/trunk/src/changes/changes.xml (original) +++ commons/proper/daemon/trunk/src/changes/changes.xml Wed Sep 19 18:15:55 2018 @@ -52,6 +52,9 @@ prunsrv stopping with error due to hardcoded timeout. + +Revered code comments for JRE and JDK locations in the registry. + Modified: commons/proper/daemon/trunk/src/native/windows/src/registry.c URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/src/registry.c?rev=1841361=1841360=1841361=diff == --- commons/proper/daemon/trunk/src/native/windows/src/registry.c (original) +++ commons/proper/daemon/trunk/src/native/windows/src/registry.c Wed Sep 19 18:15:55 2018 @@ -29,14 +29,14 @@ static LPCWSTR REGAPACHE_ROOT = L"Apac * The code below assumes the JRE and JDK arrays are the same length */ static LPCWSTR JRE_REGKEYS[] = { -L"SOFTWARE\\JavaSoft\\JRE\\", /* Oracle Java 8 and earlier */ -L"SOFTWARE\\JavaSoft\\Java Runtime Environment\\", /* Oracle Java 9 (and hopefully later) */ +L"SOFTWARE\\JavaSoft\\JRE\\", /* Oracle Java 9 (and hopefully later) */ +L"SOFTWARE\\JavaSoft\\Java Runtime Environment\\", /* Oracle Java 8 (and older) */ L"SOFTWARE\\IBM\\Java2 Runtime Environment\\", /* IBM */ NULL }; static LPCWSTR JDK_REGKEYS[] = { -L"SOFTWARE\\JavaSoft\\JDK\\", /* Oracle Java 8 and ealier */ -L"SOFTWARE\\JavaSoft\\Java Development Kit\\", /* Oracle Java 9 (and hopefully later) */ +L"SOFTWARE\\JavaSoft\\JDK\\", /* Oracle Java 9 and (and hopefully later) */ +L"SOFTWARE\\JavaSoft\\Java Development Kit\\", /* Oracle Java 8 (and older) */ L"SOFTWARE\\IBM\\Java2 Development Kit\\", /* IBM */ NULL };
Nexus: Staging Completed
Message from: https://repository.apache.orgDescription:commons-lang3-3.8.1-RC1Deployer properties:"userAgent" = "Apache-Maven/3.5.4 (Java 1.8.0_172; Mac OS X 10.13.6)""userId" = "chtompki""ip" = "199.76.125.10"Details:The following artifacts have been staged/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1-tests.jar(SHA1: 05f58ffeafc75593ce46d73062165dc5d6cca765)/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1-test-sources.jar.asc(SHA1: b85c75bfd5ac58f5ec242dbc27e2481c384504fb)/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar(SHA1: 6505a72a097d9270f7a9e7bf42c4238283247755)/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1-sources.jar(SHA1: e9748d7783594da3735ad9724390a10e7cebc01d)/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1-sources.jar.asc(SHA1: 77437655293ac7cf7044c63690157d162dc6)/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1-test-sources.jar(SHA1: 1308a9d4723d5cd2a4f1c3e0cec0054a48ccf2d2)/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar.asc(SHA1: b39c79f5d1f74af930198d05ae2360072e387ca0)/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1-tests.jar.asc(SHA1: 47bcc069a96280d122f6e6be835d612d3f4fbc85)/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.pom.asc(SHA1: e778391fd1ea3c13afc3259d17f48d8737af8e67)/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.pom(SHA1: 59092f9d06947b986318dfbe297312e08379b0ae)/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1-javadoc.jar(SHA1: e7e19f37a0e712862967e39558b888fb59ee5b6a)/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1-javadoc.jar.asc(SHA1: 5e1460fbcbdb93d367f7f769468e31134487bb84)Action performed by Rob Tompkins (chtompki)
svn commit: r29513 - in /dev/commons/lang/3.8.1-RC1: ./ binaries/ site/ site/apidocs/ site/apidocs/org/ site/apidocs/org/apache/ site/apidocs/org/apache/commons/ site/apidocs/org/apache/commons/lang3/
Author: chtompki Date: Wed Sep 19 15:27:51 2018 New Revision: 29513 Log: Staging release: commons-lang3, version: 3.8.1 [This commit notification would consist of 523 parts, which exceeds the limit of 50 ones, so it was shortened to the summary.]
[commons-lang] Git Push Summary
Repository: commons-lang Updated Tags: refs/tags/LANG_3_8_1_RC1 [created] e90d91984
svn commit: r29512 - /dev/commons/lang/3.8-RC1/
Author: chtompki Date: Wed Sep 19 15:13:27 2018 New Revision: 29512 Log: Cleaning out staging area for lang 3.8.1 Removed: dev/commons/lang/3.8-RC1/
[2/2] commons-collections git commit: [COLLECTIONS-696] AbstractReferenceMap made easier for subclassing; PR #51.
[COLLECTIONS-696] AbstractReferenceMap made easier for subclassing; PR #51. Project: http://git-wip-us.apache.org/repos/asf/commons-collections/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-collections/commit/d6800c60 Tree: http://git-wip-us.apache.org/repos/asf/commons-collections/tree/d6800c60 Diff: http://git-wip-us.apache.org/repos/asf/commons-collections/diff/d6800c60 Branch: refs/heads/master Commit: d6800c606c502bb7c1de180dc9ac9686070aad37 Parents: 2374711 Author: Gary Gregory Authored: Wed Sep 19 09:09:16 2018 -0600 Committer: Gary Gregory Committed: Wed Sep 19 09:09:16 2018 -0600 -- src/changes/changes.xml | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/commons-collections/blob/d6800c60/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 2aedeac..6bd0534 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -33,6 +33,9 @@ Replace use of deprecated Class#newInstance() PR #49. + + AbstractReferenceMap made easier for subclassing; PR #51. +
[1/2] commons-collections git commit: [COLLECTIONS-696] AbstractReferenceMap made easier for subclassing; PR #51.
Repository: commons-collections Updated Branches: refs/heads/master ad442e3c7 -> d6800c606 [COLLECTIONS-696] AbstractReferenceMap made easier for subclassing; PR #51. Project: http://git-wip-us.apache.org/repos/asf/commons-collections/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-collections/commit/23747116 Tree: http://git-wip-us.apache.org/repos/asf/commons-collections/tree/23747116 Diff: http://git-wip-us.apache.org/repos/asf/commons-collections/diff/23747116 Branch: refs/heads/master Commit: 23747116069c150e26e0dd42d61331b1108e1e01 Parents: ad442e3 Author: Maxim Solodovnik Authored: Wed Sep 19 09:09:10 2018 -0600 Committer: Gary Gregory Committed: Wed Sep 19 09:09:10 2018 -0600 -- .../collections4/map/AbstractReferenceMap.java | 30 +- .../collections4/map/ReferenceMapTest.java | 62 +++- 2 files changed, 86 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-collections/blob/23747116/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java -- diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java index 0eda632..4f4727f 100644 --- a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java +++ b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java @@ -400,13 +400,15 @@ public abstract class AbstractReferenceMap extends AbstractHashedMap HashEntry previous = null; HashEntry entry = data[index]; while (entry != null) { -if (((ReferenceEntry) entry).purge(ref)) { +ReferenceEntry refEntry = (ReferenceEntry) entry; +if (refEntry.purge(ref)) { if (previous == null) { data[index] = entry.next; } else { previous.next = entry.next; } this.size--; +refEntry.onPurge(); return; } previous = entry; @@ -722,11 +724,17 @@ public abstract class AbstractReferenceMap extends AbstractHashedMap } /** + * This is the callback for custom "after purge" logic + */ +protected void onPurge() { +} + +/** * Purges the specified reference * @param ref the reference to purge * @return true or false */ -boolean purge(final Reference ref) { +protected boolean purge(final Reference ref) { boolean r = parent.keyType != ReferenceStrength.HARD && key == ref; r = r || parent.valueType != ReferenceStrength.HARD && value == ref; if (r) { @@ -736,7 +744,7 @@ public abstract class AbstractReferenceMap extends AbstractHashedMap if (parent.valueType != ReferenceStrength.HARD) { ((Reference) value).clear(); } else if (parent.purgeValues) { -value = null; +nullValue(); } } return r; @@ -750,6 +758,13 @@ public abstract class AbstractReferenceMap extends AbstractHashedMap protected ReferenceEntry next() { return (ReferenceEntry) next; } + +/** + * This method can be overriden to provide custom logic to purge value + */ +protected void nullValue() { +value = null; +} } //--- @@ -1073,4 +1088,13 @@ public abstract class AbstractReferenceMap extends AbstractHashedMap protected boolean isKeyType(final ReferenceStrength type) { return this.keyType == type; } + +/** + * Provided protected read-only access to the value type. + * @param type the type to check against. + * @return true if valueType has the specified type + */ +protected boolean isValueType(final ReferenceStrength type) { +return this.valueType == type; +} } http://git-wip-us.apache.org/repos/asf/commons-collections/blob/23747116/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java -- diff --git a/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java b/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java index 72b108a..35699e0 100644 --- a/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java +++ b/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java @@ -21,15 +21,20 @@ import java.io.ByteArrayOutputStream; import java.io.IOException;
commons-collections git commit: Update description.
Repository: commons-collections Updated Branches: refs/heads/master 12ba7bd76 -> ad442e3c7 Update description. Project: http://git-wip-us.apache.org/repos/asf/commons-collections/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-collections/commit/ad442e3c Tree: http://git-wip-us.apache.org/repos/asf/commons-collections/tree/ad442e3c Diff: http://git-wip-us.apache.org/repos/asf/commons-collections/diff/ad442e3c Branch: refs/heads/master Commit: ad442e3c7368034c44616c96690c4525876dd6cd Parents: 12ba7bd Author: Gary Gregory Authored: Wed Sep 19 09:02:48 2018 -0600 Committer: Gary Gregory Committed: Wed Sep 19 09:02:48 2018 -0600 -- src/changes/changes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-collections/blob/ad442e3c/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 64088d2..2aedeac 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -20,7 +20,7 @@ Commons Collections Changes - + Use boolean operator for boolean result
Nexus: Staging Completed
Message from: https://repository.apache.orgDescription:Apache Commons CSV 1.6 RC1Deployer properties:"userAgent" = "Apache-Maven/3.5.4 (Java 1.8.0_161; Mac OS X 10.13.6)""userId" = "britter""ip" = "87.191.39.154"Details:The following artifacts have been staged/org/apache/commons/commons-csv/1.6/commons-csv-1.6-sources.jar.asc(SHA1: 5ca098877478f554085dace80ef4bf484ec422c0)/org/apache/commons/commons-csv/1.6/commons-csv-1.6.jar.asc(SHA1: 2c637fa312b01e091b6bf5388bca4c40890b6f8a)/org/apache/commons/commons-csv/1.6/commons-csv-1.6-test-sources.jar.asc(SHA1: 3ac363851526e57f0b833faf9ae58d93769df377)/org/apache/commons/commons-csv/1.6/commons-csv-1.6.jar(SHA1: 22b3c2f901af973a8ec4f24e80c8c0c77a600b79)/org/apache/commons/commons-csv/1.6/commons-csv-1.6.pom(SHA1: 7d6919d5b7f35a736631b37cf07c6e146e02e2d6)/org/apache/commons/commons-csv/1.6/commons-csv-1.6-javadoc.jar(SHA1: 1a912bc6e79af7903600cbc9ee7c365ee356c9af)/org/apache/commons/commons-csv/1.6/commons-csv-1.6.pom.asc(SHA1: 122fd1dd76797a3df6e21de7269f65843ade912c)/org/apache/commons/commons-csv/1.6/commons-csv-1.6-tests.jar(SHA1: 25316661324eacc7f8f61a9f389cb9efe034e43f)/org/apache/commons/commons-csv/1.6/commons-csv-1.6-sources.jar(SHA1: 7163d5c8c70c71d32507583a3f6297302b32fa71)/org/apache/commons/commons-csv/1.6/commons-csv-1.6-tests.jar.asc(SHA1: 0f148adef1676bb532170a6e4fffbbcf98f69dd5)/org/apache/commons/commons-csv/1.6/commons-csv-1.6-test-sources.jar(SHA1: 5c5d54b48c86d4972a9894dbf35edcdc5656930f)/org/apache/commons/commons-csv/1.6/commons-csv-1.6-javadoc.jar.asc(SHA1: 2f03131beeab5cf5c38e0b19e85bd0d8dfe14fd2)Action performed by Benedikt Ritter (britter)
svn commit: r29508 - in /dev/commons/csv/1.6-RC1: ./ binaries/ source/
Author: britter Date: Wed Sep 19 11:57:06 2018 New Revision: 29508 Log: Add Apache Commons CSV 1.6 RC1 Added: dev/commons/csv/1.6-RC1/ dev/commons/csv/1.6-RC1/RELEASE-NOTES.txt dev/commons/csv/1.6-RC1/binaries/ dev/commons/csv/1.6-RC1/binaries/commons-csv-1.6-bin.tar.gz (with props) dev/commons/csv/1.6-RC1/binaries/commons-csv-1.6-bin.tar.gz.asc dev/commons/csv/1.6-RC1/binaries/commons-csv-1.6-bin.tar.gz.sha512 dev/commons/csv/1.6-RC1/binaries/commons-csv-1.6-bin.zip (with props) dev/commons/csv/1.6-RC1/binaries/commons-csv-1.6-bin.zip.asc dev/commons/csv/1.6-RC1/binaries/commons-csv-1.6-bin.zip.sha512 dev/commons/csv/1.6-RC1/source/ dev/commons/csv/1.6-RC1/source/commons-csv-1.6-src.tar.gz (with props) dev/commons/csv/1.6-RC1/source/commons-csv-1.6-src.tar.gz.asc dev/commons/csv/1.6-RC1/source/commons-csv-1.6-src.tar.gz.sha512 dev/commons/csv/1.6-RC1/source/commons-csv-1.6-src.zip (with props) dev/commons/csv/1.6-RC1/source/commons-csv-1.6-src.zip.asc dev/commons/csv/1.6-RC1/source/commons-csv-1.6-src.zip.sha512 Added: dev/commons/csv/1.6-RC1/RELEASE-NOTES.txt == --- dev/commons/csv/1.6-RC1/RELEASE-NOTES.txt (added) +++ dev/commons/csv/1.6-RC1/RELEASE-NOTES.txt Wed Sep 19 11:57:06 2018 @@ -0,0 +1,386 @@ +Apache Commons CSV +Version 1.6 + Release Notes + + +INTRODUCTION: + +This document contains the release notes for the 1.6 version of +Apache Commons CSV. Commons CSV reads and writes files in variations of the +Comma Separated Value (CSV) format. + +CSV requires at least Java 7. + +The Apache Commons CSV library provides a simple interface for reading and +writing CSV files of various types. + +Feature and bug fix release. + +Changes in this version include: + +NEW FEATURES +== + +o CSV-217: Add autoFlush option for CsvPrinter. PR #24. +Thanks to Korolyov Alexei. +o CSV-220: Add API org.apache.commons.csv.CSVFormat.withSystemRecordSeparator(). +Thanks to Gary Gregory. + +FIXED BUGS + + +o CSV-219: The behavior of quote char using is not similar as Excel does when +the first string contains CJK char(s). Thanks to Zhang Hongda. +o CSV-172: Don't quote cells just because they have UTF-8 encoded characters. +Thanks to Andrew Pennebaker. +o CSV-223: Inconsistency between Javadoc of CSVFormat DEFAULT EXCEL. +Thanks to Samuel Martin. +o CSV-209: Create CSVFormat.ORACLE preset. Thanks to Gary Gregory. +o CSV-224: Some multi-iterator parsing peek sequences incorrectly consume +elements. Thanks to David Warshaw. +o CSV-225: Parse method should avoid creating a redundant BufferedReader. +Thanks to Anson Schwabecher. + +CHANGES += + +o CSV-231: Add more documentation to CSVPrinter. + + +Have fun! +-Apache Commons CSV team + +-- + +Apache Commons CSV +Version 1.5 + Release Notes + + +INTRODUCTION: + +This document contains the release notes for the 1.5 version of Apache Commons CSV. +Commons CSV reads and writes files in variations of the Comma Separated Value (CSV) format. + +CSV requires at least Java 7. + +The Apache Commons CSV library provides a simple interface for reading and writing +CSV files of various types. + +Feature and bug fix release + +Changes in this version include: + +NEW FEATURES +== + +o CSV-189: CSVParser: Add factory method accepting InputStream. Thanks to Peter Holzwarth, Gary Gregory. +o CSV-190: Add convenience API CSVFormat.print(File, Charset). Thanks to Gary Gregory. +o CSV-191: Add convenience API CSVFormat.print(Path, Charset). Thanks to Gary Gregory. +o CSV-192: Add convenience API CSVParser.parse(Path, Charset, CSVFormat). Thanks to Gary Gregory. +o CSV-205: Add convenience API CSVFormat#printer() to print to System.out. Thanks to Gary Gregory. +o CSV-207: Provide a CSV Format for printing PostgreSQL CSV and Text formats. Thanks to Gary Gregory. +o CSV-214: Adding a placeholder in the Lexer and CSV parser to store the end-of-line string. Thanks to Nitin Mahendru, Gary Gregory. + +FIXED BUGS + + +o CSV-203: withNullString value is printed without quotes when QuoteMode.ALL is specified; add QuoteMode.ALL_NON_NULL. PR #17. Thanks to Richard Wheeldon, Kai Paroth. +o CSV-194: Fix outdated comments about FileReader in CSVParser #13. Thanks to Marc Prud'hommeaux. +o CSV-193: Fix incorrect method name 'withFirstRowAsHeader' in user guide. Thanks to Matthias Wiehl. +o CSV-171: Negative numeric values in the first column are always quoted in minimal mode. Thanks to Gary Gregory, Michael Graessle, Adrian Bridgett. + +CHANGES += + +o
commons-csv git commit: Update version numbers for commons-csv release 1.6
Repository: commons-csv Updated Branches: refs/heads/release 11b557ee4 -> 2596fdeeb Update version numbers for commons-csv release 1.6 Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/2596fdee Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/2596fdee Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/2596fdee Branch: refs/heads/release Commit: 2596fdeebcab53fe459c481990bf1dec838128a5 Parents: 11b557e Author: Benedikt Ritter Authored: Wed Sep 19 13:45:44 2018 +0200 Committer: Benedikt Ritter Committed: Wed Sep 19 13:45:44 2018 +0200 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/2596fdee/pom.xml -- diff --git a/pom.xml b/pom.xml index 893989b..a920cbc 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ 47 commons-csv - 1.6-SNAPSHOT + 1.6 Apache Commons CSV http://commons.apache.org/proper/commons-csv/
[commons-csv] Git Push Summary
Repository: commons-csv Updated Tags: refs/tags/csv-1.6-RC1 [created] 3c2d7919f
[3/5] commons-csv git commit: Add release date
Add release date Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/b3bb9776 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/b3bb9776 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/b3bb9776 Branch: refs/heads/release Commit: b3bb9776ae91da0d14d3039a58b7fe20f9482300 Parents: a6458f1 Author: Benedikt Ritter Authored: Wed Sep 19 11:27:08 2018 +0200 Committer: Benedikt Ritter Committed: Wed Sep 19 11:27:08 2018 +0200 -- src/changes/changes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/b3bb9776/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 607b979..66cccab 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -38,7 +38,7 @@ Release Notes - + Add more documentation to CSVPrinter. Add autoFlush option for CsvPrinter. PR #24. The behavior of quote char using is not similar as Excel does when the first string contains CJK char(s).
[2/5] commons-csv git commit: Add RELEASE-NOTES for release 1.6
Add RELEASE-NOTES for release 1.6 Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/a6458f15 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/a6458f15 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/a6458f15 Branch: refs/heads/release Commit: a6458f1587cd0159598f3fd984e2c810b94acc0d Parents: 6182013 Author: Benedikt Ritter Authored: Wed Sep 19 11:26:20 2018 +0200 Committer: Benedikt Ritter Committed: Wed Sep 19 11:26:20 2018 +0200 -- RELEASE-NOTES.txt | 54 ++ 1 file changed, 54 insertions(+) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/a6458f15/RELEASE-NOTES.txt -- diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index cf7c853..3497353 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,4 +1,58 @@ Apache Commons CSV +Version 1.6 + Release Notes + + +INTRODUCTION: + +This document contains the release notes for the 1.6 version of +Apache Commons CSV. Commons CSV reads and writes files in variations of the +Comma Separated Value (CSV) format. + +CSV requires at least Java 7. + +The Apache Commons CSV library provides a simple interface for reading and +writing CSV files of various types. + +Feature and bug fix release. + +Changes in this version include: + +NEW FEATURES +== + +o CSV-217: Add autoFlush option for CsvPrinter. PR #24. +Thanks to Korolyov Alexei. +o CSV-220: Add API org.apache.commons.csv.CSVFormat.withSystemRecordSeparator(). +Thanks to Gary Gregory. + +FIXED BUGS + + +o CSV-219: The behavior of quote char using is not similar as Excel does when +the first string contains CJK char(s). Thanks to Zhang Hongda. +o CSV-172: Don't quote cells just because they have UTF-8 encoded characters. +Thanks to Andrew Pennebaker. +o CSV-223: Inconsistency between Javadoc of CSVFormat DEFAULT EXCEL. +Thanks to Samuel Martin. +o CSV-209: Create CSVFormat.ORACLE preset. Thanks to Gary Gregory. +o CSV-224: Some multi-iterator parsing peek sequences incorrectly consume +elements. Thanks to David Warshaw. +o CSV-225: Parse method should avoid creating a redundant BufferedReader. +Thanks to Anson Schwabecher. + +CHANGES += + +o CSV-231: Add more documentation to CSVPrinter. + + +Have fun! +-Apache Commons CSV team + +-- + +Apache Commons CSV Version 1.5 Release Notes
[5/5] commons-csv git commit: Update NOTICE.txt
Update NOTICE.txt Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/11b557ee Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/11b557ee Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/11b557ee Branch: refs/heads/release Commit: 11b557ee48d0e71d96663932d446e9b12d78a611 Parents: 544400b Author: Benedikt Ritter Authored: Wed Sep 19 11:54:57 2018 +0200 Committer: Benedikt Ritter Committed: Wed Sep 19 11:54:57 2018 +0200 -- NOTICE.txt | 2 +- pom.xml| 1 + 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/11b557ee/NOTICE.txt -- diff --git a/NOTICE.txt b/NOTICE.txt index 14c9397..85a48c8 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1,5 +1,5 @@ Apache Commons CSV -Copyright 2005-2017 The Apache Software Foundation +Copyright 2005-2018 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). http://git-wip-us.apache.org/repos/asf/commons-csv/blob/11b557ee/pom.xml -- diff --git a/pom.xml b/pom.xml index d694794..893989b 100644 --- a/pom.xml +++ b/pom.xml @@ -142,6 +142,7 @@ CSV files of various types. org.apache.commons.csv CSV 12313222 +2005 1.7 1.7
[4/5] commons-csv git commit: Regenerate GitHub documentation
Regenerate GitHub documentation Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/544400be Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/544400be Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/544400be Branch: refs/heads/release Commit: 544400be1858c5c060f1edfc455b02b34747c21e Parents: b3bb977 Author: Benedikt Ritter Authored: Wed Sep 19 11:52:48 2018 +0200 Committer: Benedikt Ritter Committed: Wed Sep 19 11:52:48 2018 +0200 -- CONTRIBUTING.md | 4 ++-- README.md | 8 2 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/544400be/CONTRIBUTING.md -- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a259af1..5d133b3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,7 +50,7 @@ Getting Started + Make sure you have a [JIRA account](https://issues.apache.org/jira/). + Make sure you have a [GitHub account](https://github.com/signup/free). -+ If you're planning to implement a new feature it makes sense to discuss you're changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in Apache Commons CSV's scope. ++ If you're planning to implement a new feature it makes sense to discuss your changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in Apache Commons CSV's scope. + Submit a [Jira Ticket][jira] for your issue, assuming one does not already exist. + Clearly describe the issue including steps to reproduce when it is a bug. + Make sure you fill in the earliest version that you know has the issue. @@ -107,7 +107,7 @@ Additional Resources + [Apache Commons CSV JIRA project page][jira] + [Contributor License Agreement][cla] + [General GitHub documentation](https://help.github.com/) -+ [GitHub pull request documentation](https://help.github.com/send-pull-requests/) ++ [GitHub pull request documentation](https://help.github.com/articles/creating-a-pull-request/) + [Apache Commons Twitter Account](https://twitter.com/ApacheCommons) + `#apache-commons` IRC channel on `irc.freenode.net` http://git-wip-us.apache.org/repos/asf/commons-csv/blob/544400be/README.md -- diff --git a/README.md b/README.md index 68b7aa4..32385ab 100644 --- a/README.md +++ b/README.md @@ -43,10 +43,10 @@ Apache Commons CSV === -[![Build Status](https://travis-ci.org/apache/commons-csv.svg?branch=master)](https://travis-ci.org/apache/commons-csv) -[![Coverage Status](https://coveralls.io/repos/apache/commons-csv/badge.svg?branch=master)](https://coveralls.io/r/apache/commons-csv) +[![Build Status](https://travis-ci.org/apache/commons-csv.svg)](https://travis-ci.org/apache/commons-csv) +[![Coverage Status](https://coveralls.io/repos/apache/commons-csv/badge.svg)](https://coveralls.io/r/apache/commons-csv) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-csv/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-csv/) -[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) +[![Javadocs](https://javadoc.io/badge/org.apache.commons/commons-csv/1.6.svg)](https://javadoc.io/doc/org.apache.commons/commons-csv/1.6) The Apache Commons CSV library provides a simple interface for reading and writing CSV files of various types. @@ -68,7 +68,7 @@ Alternatively you can pull it from the central Maven repositories: org.apache.commons commons-csv - 1.5 + 1.6 ```
[1/5] commons-csv git commit: Generate download page for release 1.6
Repository: commons-csv Updated Branches: refs/heads/release 2596582d6 -> 11b557ee4 Generate download page for release 1.6 Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/61820130 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/61820130 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/61820130 Branch: refs/heads/release Commit: 61820130cda780da09627ecab910a003567a280c Parents: 2596582 Author: Benedikt Ritter Authored: Wed Sep 19 11:16:55 2018 +0200 Committer: Benedikt Ritter Committed: Wed Sep 19 11:16:55 2018 +0200 -- src/site/xdoc/download_csv.xml | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/61820130/src/site/xdoc/download_csv.xml -- diff --git a/src/site/xdoc/download_csv.xml b/src/site/xdoc/download_csv.xml index ab02d63..4eaf015 100644 --- a/src/site/xdoc/download_csv.xml +++ b/src/site/xdoc/download_csv.xml @@ -102,7 +102,7 @@ limitations under the License. It is essential that you https://www.apache.org/info/verification.html;>verify the integrity of downloaded files, preferably using the PGP signature (*.asc files); -failing that using the MD5 hash (*.md5 checksum files). +failing that using the SHA-512 hash (*.sha512 checksum files). The https://www.apache.org/dist/commons/KEYS;>KEYS @@ -111,32 +111,32 @@ limitations under the License. - + - commons-csv-1.5-bin.tar.gz - https://www.apache.org/dist/commons/csv/binaries/commons-csv-1.5-bin.tar.gz.md5;>md5 - https://www.apache.org/dist/commons/csv/binaries/commons-csv-1.5-bin.tar.gz.asc;>pgp + commons-csv-1.6-bin.tar.gz + https://www.apache.org/dist/commons/csv/binaries/commons-csv-1.6-bin.tar.gz.sha512;>sha512 + https://www.apache.org/dist/commons/csv/binaries/commons-csv-1.6-bin.tar.gz.asc;>pgp - commons-csv-1.5-bin.zip - https://www.apache.org/dist/commons/csv/binaries/commons-csv-1.5-bin.zip.md5;>md5 - https://www.apache.org/dist/commons/csv/binaries/commons-csv-1.5-bin.zip.asc;>pgp + commons-csv-1.6-bin.zip + https://www.apache.org/dist/commons/csv/binaries/commons-csv-1.6-bin.zip.sha512;>sha512 + https://www.apache.org/dist/commons/csv/binaries/commons-csv-1.6-bin.zip.asc;>pgp - commons-csv-1.5-src.tar.gz - https://www.apache.org/dist/commons/csv/source/commons-csv-1.5-src.tar.gz.md5;>md5 - https://www.apache.org/dist/commons/csv/source/commons-csv-1.5-src.tar.gz.asc;>pgp + commons-csv-1.6-src.tar.gz + https://www.apache.org/dist/commons/csv/source/commons-csv-1.6-src.tar.gz.sha512;>sha512 + https://www.apache.org/dist/commons/csv/source/commons-csv-1.6-src.tar.gz.asc;>pgp - commons-csv-1.5-src.zip - https://www.apache.org/dist/commons/csv/source/commons-csv-1.5-src.zip.md5;>md5 - https://www.apache.org/dist/commons/csv/source/commons-csv-1.5-src.zip.asc;>pgp + commons-csv-1.6-src.zip + https://www.apache.org/dist/commons/csv/source/commons-csv-1.6-src.zip.sha512;>sha512 + https://www.apache.org/dist/commons/csv/source/commons-csv-1.6-src.zip.asc;>pgp
svn commit: r1841307 - in /commons/cms-site/trunk/content/xdoc: new-sandbox-component.xml releases/prepare.xml
Author: britter Date: Wed Sep 19 09:47:29 2018 New Revision: 1841307 URL: http://svn.apache.org/viewvc?rev=1841307=rev Log: Update documentation to reflect new commons-build-plugin goalPrefix Modified: commons/cms-site/trunk/content/xdoc/new-sandbox-component.xml commons/cms-site/trunk/content/xdoc/releases/prepare.xml Modified: commons/cms-site/trunk/content/xdoc/new-sandbox-component.xml URL: http://svn.apache.org/viewvc/commons/cms-site/trunk/content/xdoc/new-sandbox-component.xml?rev=1841307=1841306=1841307=diff == --- commons/cms-site/trunk/content/xdoc/new-sandbox-component.xml (original) +++ commons/cms-site/trunk/content/xdoc/new-sandbox-component.xml Wed Sep 19 09:47:29 2018 @@ -165,7 +165,7 @@ - mvn commons:sandbox-jira-page + mvn commons-build:sandbox-jira-page Modified: commons/cms-site/trunk/content/xdoc/releases/prepare.xml URL: http://svn.apache.org/viewvc/commons/cms-site/trunk/content/xdoc/releases/prepare.xml?rev=1841307=1841306=1841307=diff == --- commons/cms-site/trunk/content/xdoc/releases/prepare.xml (original) +++ commons/cms-site/trunk/content/xdoc/releases/prepare.xml Wed Sep 19 09:47:29 2018 @@ -247,7 +247,7 @@ mvn versions:display-plugin-updates -U - mvn [-N] commons:download-page [-Dcommons.release.version=m.n] + mvn [-N] commons-build:download-page [-Dcommons.release.version=m.n] svn commit -m "Updated download page in preparation for 1.2 release." src/site/xdoc/download_foo.xml Or when using git:
commons-build-plugin git commit: Update documentation according to new plugin goalPrefix
Repository: commons-build-plugin Updated Branches: refs/heads/master 4a97cc48c -> 4a2fda52d Update documentation according to new plugin goalPrefix Project: http://git-wip-us.apache.org/repos/asf/commons-build-plugin/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-build-plugin/commit/4a2fda52 Tree: http://git-wip-us.apache.org/repos/asf/commons-build-plugin/tree/4a2fda52 Diff: http://git-wip-us.apache.org/repos/asf/commons-build-plugin/diff/4a2fda52 Branch: refs/heads/master Commit: 4a2fda52dea504dc49bec6e408b63cd0245962ef Parents: 4a97cc4 Author: Benedikt Ritter Authored: Wed Sep 19 11:45:36 2018 +0200 Committer: Benedikt Ritter Committed: Wed Sep 19 11:45:36 2018 +0200 -- CONTRIBUTING.md | 2 +- README.md | 2 +- .../contributing-md-template.md | 2 +- .../download-page-head.xml | 2 +- .../issue-tracking-template.xml | 2 +- .../mail-lists-template.xml | 2 +- .../no-download-page-template.xml | 2 +- .../readme-md-template.md | 2 +- .../sandbox-issue-tracking-template.xml | 2 +- src/main/scripts/copy-javadoc-files.build.xml | 2 +- src/main/scripts/generate-xdocs.build.xml | 28 ++-- src/site/xdoc/all-mojo-sandbox.xml | 6 ++--- src/site/xdoc/all-mojo.xml | 6 ++--- src/site/xdoc/all-sandbox.xml | 8 +++--- src/site/xdoc/all.xml | 8 +++--- src/site/xdoc/contributing-md-mojo.xml | 6 ++--- src/site/xdoc/contributing-md.xml | 6 ++--- src/site/xdoc/copy-javadoc-files-mojo.xml | 6 ++--- src/site/xdoc/development.xml | 4 +-- src/site/xdoc/download-page-mojo.xml| 6 ++--- src/site/xdoc/download-page.xml | 6 ++--- src/site/xdoc/download_commons-build-plugin.xml | 2 +- src/site/xdoc/index.xml | 18 ++--- src/site/xdoc/issue-tracking.xml| 2 +- src/site/xdoc/jira-page-mojo.xml| 6 ++--- src/site/xdoc/jira-page.xml | 8 +++--- src/site/xdoc/mail-lists.xml| 2 +- src/site/xdoc/mail-page-mojo.xml| 6 ++--- src/site/xdoc/mail-page.xml | 6 ++--- src/site/xdoc/notice-txt-mojo.xml | 6 ++--- src/site/xdoc/notice-txt.xml| 6 ++--- src/site/xdoc/readme-md-mojo.xml| 6 ++--- src/site/xdoc/readme-md.xml | 6 ++--- src/site/xdoc/sandbox-jira-page-mojo.xml| 6 ++--- src/site/xdoc/sandbox-jira-page.xml | 8 +++--- 35 files changed, 99 insertions(+), 99 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-build-plugin/blob/4a2fda52/CONTRIBUTING.md -- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 21bf919..d02572b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,7 @@ | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates | +==+ | | - | 1) Re-generate using: mvn commons:contributing-md| + | 1) Re-generate using: mvn commons-build:contributing-md | | | | 2) Set the following properties in the component's pom: | |- commons.jira.id (required, alphabetic, upper case) | http://git-wip-us.apache.org/repos/asf/commons-build-plugin/blob/4a2fda52/README.md -- diff --git a/README.md b/README.md index 6cf8981..fc7f211 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates | +==+ | | - | 1) Re-generate using: mvn commons:readme-md | + | 1) Re-generate using: mvn commons-build:readme-md| | | | 2) Set the following properties in the component's pom: | |- commons.componentid (required, alphabetic, lower case) | http://git-wip-us.apache.org/repos/asf/commons-build-plugin/blob/4a2fda52/src/main/resources/commons-xdoc-templates/contributing-md-template.md -- diff --git
[15/48] commons-csv git commit: Remove trailing white spaces on all lines.
Remove trailing white spaces on all lines. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/c6cd6ce8 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/c6cd6ce8 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/c6cd6ce8 Branch: refs/heads/release Commit: c6cd6ce8ee461328d3331fd96e82c8f8651b4ee4 Parents: 0051a83 Author: Gary Gregory Authored: Wed Nov 1 16:05:40 2017 -0600 Committer: Gary Gregory Committed: Wed Nov 1 16:05:40 2017 -0600 -- src/main/java/org/apache/commons/csv/CSVPrinter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/c6cd6ce8/src/main/java/org/apache/commons/csv/CSVPrinter.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVPrinter.java b/src/main/java/org/apache/commons/csv/CSVPrinter.java index c8ce042..6049173 100644 --- a/src/main/java/org/apache/commons/csv/CSVPrinter.java +++ b/src/main/java/org/apache/commons/csv/CSVPrinter.java @@ -87,7 +87,7 @@ public final class CSVPrinter implements Flushable, Closeable { /** * Closes the underlying stream with an optional flush first. * @param flush whether to flush before the actual close. - * + * * @throws IOException * If an I/O error occurs * @since 1.6
[41/48] commons-csv git commit: CR and LF are already statically imported
CR and LF are already statically imported Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/e5b2413c Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/e5b2413c Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/e5b2413c Branch: refs/heads/release Commit: e5b2413ca760a5d75f8a7030d5dad6c221ed4fa8 Parents: 7694e8f Author: Benedikt Ritter Authored: Tue Aug 21 22:08:33 2018 +0200 Committer: Benedikt Ritter Committed: Tue Aug 21 22:08:33 2018 +0200 -- src/main/java/org/apache/commons/csv/Lexer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/e5b2413c/src/main/java/org/apache/commons/csv/Lexer.java -- diff --git a/src/main/java/org/apache/commons/csv/Lexer.java b/src/main/java/org/apache/commons/csv/Lexer.java index 76fa81e..b29fc14 100644 --- a/src/main/java/org/apache/commons/csv/Lexer.java +++ b/src/main/java/org/apache/commons/csv/Lexer.java @@ -38,8 +38,8 @@ import java.io.IOException; */ final class Lexer implements Closeable { -private static final String CR_STRING = Character.toString(Constants.CR); -private static final String LF_STRING = Character.toString(Constants.LF); +private static final String CR_STRING = Character.toString(CR); +private static final String LF_STRING = Character.toString(LF); /** * Constant char to use for disabling comments, escapes and encapsulation. The value -2 is used because it
[39/48] commons-csv git commit: Call flush instead of duplicating the logic
Call flush instead of duplicating the logic Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/676a580c Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/676a580c Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/676a580c Branch: refs/heads/release Commit: 676a580c350874a27a357520e7ff309a66b2378f Parents: 47dbc8f Author: Benedikt Ritter Authored: Tue Aug 21 22:02:02 2018 +0200 Committer: Benedikt Ritter Committed: Tue Aug 21 22:02:02 2018 +0200 -- src/main/java/org/apache/commons/csv/CSVPrinter.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/676a580c/src/main/java/org/apache/commons/csv/CSVPrinter.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVPrinter.java b/src/main/java/org/apache/commons/csv/CSVPrinter.java index 6049173..d639c60 100644 --- a/src/main/java/org/apache/commons/csv/CSVPrinter.java +++ b/src/main/java/org/apache/commons/csv/CSVPrinter.java @@ -94,9 +94,7 @@ public final class CSVPrinter implements Flushable, Closeable { */ public void close(final boolean flush) throws IOException { if (flush || format.getAutoFlush()) { -if (out instanceof Flushable) { -((Flushable) out).flush(); -} +flush(); } if (out instanceof Closeable) { ((Closeable) out).close();
[19/48] commons-csv git commit: Sort methods.
Sort methods. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/34262e8c Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/34262e8c Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/34262e8c Branch: refs/heads/release Commit: 34262e8c5e0d6746b914468d9e8f739b9f3cfa13 Parents: 4f58df6 Author: Gary Gregory Authored: Mon Dec 11 11:49:36 2017 -0700 Committer: Gary Gregory Committed: Mon Dec 11 11:49:36 2017 -0700 -- .../java/org/apache/commons/csv/CSVFormat.java | 122 +-- 1 file changed, 61 insertions(+), 61 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/34262e8c/src/main/java/org/apache/commons/csv/CSVFormat.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index dc7588b..9e6c807 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -749,6 +749,16 @@ public final class CSVFormat implements Serializable { } /** + * Returns whether to flush on close. + * + * @return whether to flush on close. + * @since 1.6 + */ +public boolean getAutoFlush() { +return autoFlush; +} + +/** * Returns the character marking the start of a line comment. * * @return the comment start marker, may be {@code null} @@ -891,16 +901,6 @@ public final class CSVFormat implements Serializable { return trim; } -/** - * Returns whether to flush on close. - * - * @return whether to flush on close. - * @since 1.6 - */ -public boolean getAutoFlush() { -return autoFlush; -} - @Override public int hashCode() { final int prime = 31; @@ -994,22 +994,6 @@ public final class CSVFormat implements Serializable { } /** - * Prints to the {@link System#out}. - * - * - * See also {@link CSVPrinter}. - * - * - * @return a printer to {@link System#out}. - * @throws IOException - * thrown if the optional header cannot be printed. - * @since 1.5 - */ -public CSVPrinter printer() throws IOException { -return new CSVPrinter(System.out, this); -} - -/** * Prints to the specified output. * * @@ -1032,26 +1016,6 @@ public final class CSVFormat implements Serializable { } /** - * Prints to the specified output. - * - * - * See also {@link CSVPrinter}. - * - * - * @param out - *the output. - * @param charset - *A charset. - * @return a printer to an output. - * @throws IOException - * thrown if the optional header cannot be printed. - * @since 1.5 - */ -public CSVPrinter print(final Path out, final Charset charset) throws IOException { -return print(Files.newBufferedWriter(out, charset)); -} - -/** * Prints the {@code value} as the next value on the line to {@code out}. The value will be escaped or encapsulated * as needed. Useful when one wants to avoid creating CSVPrinters. * @@ -1104,6 +1068,26 @@ public final class CSVFormat implements Serializable { } } +/** + * Prints to the specified output. + * + * + * See also {@link CSVPrinter}. + * + * + * @param out + *the output. + * @param charset + *A charset. + * @return a printer to an output. + * @throws IOException + * thrown if the optional header cannot be printed. + * @since 1.5 + */ +public CSVPrinter print(final Path out, final Charset charset) throws IOException { +return print(Files.newBufferedWriter(out, charset)); +} + /* * Note: must only be called if escaping is enabled, otherwise will generate NPE */ @@ -1254,6 +1238,22 @@ public final class CSVFormat implements Serializable { } /** + * Prints to the {@link System#out}. + * + * + * See also {@link CSVPrinter}. + * + * + * @return a printer to {@link System#out}. + * @throws IOException + * thrown if the optional header cannot be printed. + * @since 1.5 + */ +public CSVPrinter printer() throws IOException { +return new CSVPrinter(System.out, this); +} + +/** * Outputs the trailing delimiter (if set) followed by the record separator (if set). * * @param out @@ -1446,6 +1446,21 @@ public final class CSVFormat implements Serializable { } /** + * Returns a new {@code CSVFormat} with whether
[44/48] commons-csv git commit: Update to latest commons-parent
Update to latest commons-parent Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/62515c52 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/62515c52 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/62515c52 Branch: refs/heads/release Commit: 62515c52eccb30533615c0dfd8bf072b635268db Parents: 4e1802d Author: Benedikt Ritter Authored: Wed Sep 19 10:32:55 2018 +0200 Committer: Benedikt Ritter Committed: Wed Sep 19 10:32:55 2018 +0200 -- pom.xml | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/62515c52/pom.xml -- diff --git a/pom.xml b/pom.xml index f9491cf..5433ba2 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ org.apache.commons commons-parent -43 +47 commons-csv 1.6-SNAPSHOT @@ -152,6 +152,9 @@ CSV files of various types. 2.17 ${basedir}/LICENSE-header.txt LICENSE.txt, NOTICE.txt + + + https://svn.apache.org/repos/infra/websites/production/commons/content/proper/${project.artifactId}
[08/48] commons-csv git commit: [CSV-217] Add autoFlush option for CsvPrinter. Use current version of Mockito.
[CSV-217] Add autoFlush option for CsvPrinter. Use current version of Mockito. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/b4a084ed Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/b4a084ed Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/b4a084ed Branch: refs/heads/release Commit: b4a084ed4839f297ab3f88c48d48f5081f229c96 Parents: 5ca0f91 Author: Gary Gregory Authored: Mon Oct 9 13:26:57 2017 -0600 Committer: Gary Gregory Committed: Mon Oct 9 13:26:57 2017 -0600 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/b4a084ed/pom.xml -- diff --git a/pom.xml b/pom.xml index a9777da..266b509 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ CSV files of various types. org.mockito mockito-all - 1.9.5 + 1.10.19 test
[30/48] commons-csv git commit: [CSV-225] Parse method should avoid creating a redundant BufferedReader.
[CSV-225] Parse method should avoid creating a redundant BufferedReader. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/865872e0 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/865872e0 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/865872e0 Branch: refs/heads/release Commit: 865872e0f1517796f4b203ff7682d922119514fa Parents: f368f64 Author: Gary Gregory Authored: Sat May 19 09:03:29 2018 -0600 Committer: Gary Gregory Committed: Sat May 19 09:03:29 2018 -0600 -- .../java/org/apache/commons/csv/CSVParser.java | 2 +- .../org/apache/commons/csv/CSVParserTest.java | 69 +++- .../org/apache/commons/csv/PerformanceTest.java | 172 --- 3 files changed, 174 insertions(+), 69 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/865872e0/src/main/java/org/apache/commons/csv/CSVParser.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVParser.java b/src/main/java/org/apache/commons/csv/CSVParser.java index 7e9d7d4..ac45c72 100644 --- a/src/main/java/org/apache/commons/csv/CSVParser.java +++ b/src/main/java/org/apache/commons/csv/CSVParser.java @@ -203,7 +203,7 @@ public final class CSVParser implements Iterable, Closeable { public static CSVParser parse(final Path path, final Charset charset, final CSVFormat format) throws IOException { Assertions.notNull(path, "path"); Assertions.notNull(format, "format"); -return parse(Files.newBufferedReader(path, charset), format); +return parse(Files.newInputStream(path), charset, format); } /** http://git-wip-us.apache.org/repos/asf/commons-csv/blob/865872e0/src/test/java/org/apache/commons/csv/CSVParserTest.java -- diff --git a/src/test/java/org/apache/commons/csv/CSVParserTest.java b/src/test/java/org/apache/commons/csv/CSVParserTest.java index 1e1d7a6..8336154 100644 --- a/src/test/java/org/apache/commons/csv/CSVParserTest.java +++ b/src/test/java/org/apache/commons/csv/CSVParserTest.java @@ -39,6 +39,9 @@ import java.io.StringWriter; import java.net.URL; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -810,24 +813,78 @@ public class CSVParserTest { } } +@Test +public void testParse() throws Exception { +final ClassLoader loader = ClassLoader.getSystemClassLoader(); +final URL url = loader.getResource("CSVFileParser/test.csv"); +final CSVFormat format = CSVFormat.DEFAULT.withHeader("A", "B", "C", "D"); +final Charset charset = StandardCharsets.UTF_8; + +try(final CSVParser parser = CSVParser.parse(new InputStreamReader(url.openStream(), charset), format)) { +parseFully(parser); +} +try(final CSVParser parser = CSVParser.parse(new String(Files.readAllBytes(Paths.get(url.toURI())), charset), format)) { +parseFully(parser); +} +try(final CSVParser parser = CSVParser.parse(new File(url.toURI()), charset, format)) { +parseFully(parser); +} +try(final CSVParser parser = CSVParser.parse(url.openStream(), charset, format)) { +parseFully(parser); +} +try(final CSVParser parser = CSVParser.parse(Paths.get(url.toURI()), charset, format)) { +parseFully(parser); +} +try(final CSVParser parser = CSVParser.parse(url, charset, format)) { +parseFully(parser); +} +try(final CSVParser parser = new CSVParser(new InputStreamReader(url.openStream(), charset), format)) { +parseFully(parser); +} +try(final CSVParser parser = new CSVParser(new InputStreamReader(url.openStream(), charset), format, /*characterOffset=*/0, /*recordNumber=*/1)) { +parseFully(parser); +} +} + +private void parseFully(final CSVParser parser) { +for (final Iterator records = parser.iterator(); records.hasNext(); ) { +records.next(); +} +} + @Test(expected = IllegalArgumentException.class) public void testParseFileNullFormat() throws Exception { -CSVParser.parse(new File(""), Charset.defaultCharset(), null); +try (final CSVParser parser = CSVParser.parse(new File("CSVFileParser/test.csv"), Charset.defaultCharset(), null)) { +Assert.fail("This test should have thrown an exception."); +} } @Test(expected = IllegalArgumentException.class) public void
[09/48] commons-csv git commit: Use final.
Use final. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/0c216e78 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/0c216e78 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/0c216e78 Branch: refs/heads/release Commit: 0c216e783cbff346c820cabb83486e4401b2c0a2 Parents: b4a084e Author: Gary Gregory Authored: Mon Oct 9 13:43:02 2017 -0600 Committer: Gary Gregory Committed: Mon Oct 9 13:43:02 2017 -0600 -- .../java/org/apache/commons/csv/CSVFormat.java | 6 +- .../java/org/apache/commons/csv/CSVParser.java | 2 +- .../java/org/apache/commons/csv/CSVPrinter.java | 2 +- .../org/apache/commons/csv/CSVFormatTest.java | 36 +-- .../org/apache/commons/csv/CSVParserTest.java | 2 +- .../org/apache/commons/csv/CSVPrinterTest.java | 64 ++-- .../commons/csv/issues/JiraCsv198Test.java | 6 +- .../commons/csv/issues/JiraCsv203Test.java | 42 ++--- .../commons/csv/issues/JiraCsv213Test.java | 6 +- 9 files changed, 83 insertions(+), 83 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/0c216e78/src/main/java/org/apache/commons/csv/CSVFormat.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index 29b7c36..00f1064 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -630,7 +630,7 @@ public final class CSVFormat implements Serializable { final boolean ignoreEmptyLines, final String recordSeparator, final String nullString, final Object[] headerComments, final String[] header, final boolean skipHeaderRecord, final boolean allowMissingColumnNames, final boolean ignoreHeaderCase, final boolean trim, - final boolean trailingDelimiter, boolean autoFlush) { + final boolean trailingDelimiter, final boolean autoFlush) { this.delimiter = delimiter; this.quoteCharacter = quoteChar; this.quoteMode = quoteMode; @@ -1026,7 +1026,7 @@ public final class CSVFormat implements Serializable { * @since 1.5 */ @SuppressWarnings("resource") -public CSVPrinter print(final File out, Charset charset) throws IOException { +public CSVPrinter print(final File out, final Charset charset) throws IOException { // The writer will be closed when close() is called. return new CSVPrinter(new OutputStreamWriter(new FileOutputStream(out), charset), this); } @@ -1047,7 +1047,7 @@ public final class CSVFormat implements Serializable { * thrown if the optional header cannot be printed. * @since 1.5 */ -public CSVPrinter print(final Path out, Charset charset) throws IOException { +public CSVPrinter print(final Path out, final Charset charset) throws IOException { return print(Files.newBufferedWriter(out, charset)); } http://git-wip-us.apache.org/repos/asf/commons-csv/blob/0c216e78/src/main/java/org/apache/commons/csv/CSVParser.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVParser.java b/src/main/java/org/apache/commons/csv/CSVParser.java index 09251a3..06108f6 100644 --- a/src/main/java/org/apache/commons/csv/CSVParser.java +++ b/src/main/java/org/apache/commons/csv/CSVParser.java @@ -225,7 +225,7 @@ public final class CSVParser implements Iterable, Closeable { * If there is a problem reading the header or skipping the first record * @since 1.5 */ -public static CSVParser parse(Reader reader, final CSVFormat format) throws IOException { +public static CSVParser parse(final Reader reader, final CSVFormat format) throws IOException { return new CSVParser(reader, format); } http://git-wip-us.apache.org/repos/asf/commons-csv/blob/0c216e78/src/main/java/org/apache/commons/csv/CSVPrinter.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVPrinter.java b/src/main/java/org/apache/commons/csv/CSVPrinter.java index 49d9022..c8ce042 100644 --- a/src/main/java/org/apache/commons/csv/CSVPrinter.java +++ b/src/main/java/org/apache/commons/csv/CSVPrinter.java @@ -92,7 +92,7 @@ public final class CSVPrinter implements Flushable, Closeable { * If an I/O error occurs * @since 1.6 */ -public void close(boolean flush) throws IOException { +public void close(final boolean flush) throws IOException { if (flush ||
[37/48] commons-csv git commit: Method in package private class does not need to be public
Method in package private class does not need to be public Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/768f656c Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/768f656c Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/768f656c Branch: refs/heads/release Commit: 768f656c4329b44d28b25ab94d7686172f99f6b1 Parents: 3d4a7e6 Author: Benedikt Ritter Authored: Tue Aug 21 09:22:08 2018 +0200 Committer: Benedikt Ritter Committed: Tue Aug 21 09:22:08 2018 +0200 -- src/main/java/org/apache/commons/csv/Assertions.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/768f656c/src/main/java/org/apache/commons/csv/Assertions.java -- diff --git a/src/main/java/org/apache/commons/csv/Assertions.java b/src/main/java/org/apache/commons/csv/Assertions.java index f22002d..057b3d7 100644 --- a/src/main/java/org/apache/commons/csv/Assertions.java +++ b/src/main/java/org/apache/commons/csv/Assertions.java @@ -30,7 +30,7 @@ final class Assertions { // can not be instantiated } -public static void notNull(final Object parameter, final String parameterName) { +static void notNull(final Object parameter, final String parameterName) { if (parameter == null) { throw new IllegalArgumentException("Parameter '" + parameterName + "' must not be null!"); }
[16/48] commons-csv git commit: Update tests from Apache Commons Lang 3.6 to 3.7.
Update tests from Apache Commons Lang 3.6 to 3.7. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/e76c4d80 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/e76c4d80 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/e76c4d80 Branch: refs/heads/release Commit: e76c4d809cf2b39a9d7fe831b63e60891fe47f55 Parents: c6cd6ce Author: ggregory Authored: Sun Dec 10 16:27:09 2017 -0700 Committer: ggregory Committed: Sun Dec 10 16:27:09 2017 -0700 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/e76c4d80/pom.xml -- diff --git a/pom.xml b/pom.xml index 8623b92..68fb8e2 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ CSV files of various types. org.apache.commons commons-lang3 - 3.6 + 3.7 test
[05/48] commons-csv git commit: Next version will be 1.6 due to new auto-flush feature just added.
Next version will be 1.6 due to new auto-flush feature just added. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/9c203414 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/9c203414 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/9c203414 Branch: refs/heads/release Commit: 9c203414696118e291279ff3a2eb1d58b93d Parents: 7e47152 Author: Gary Gregory Authored: Mon Oct 9 13:23:46 2017 -0600 Committer: Gary Gregory Committed: Mon Oct 9 13:23:46 2017 -0600 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/9c203414/pom.xml -- diff --git a/pom.xml b/pom.xml index 8b13c17..0feb5be 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ 42 commons-csv - 1.5.1-SNAPSHOT + 1.6-SNAPSHOT Apache Commons CSV http://commons.apache.org/proper/commons-csv/
[12/48] commons-csv git commit: Update tests from Apache Commons IO 2.5 to 2.6.
Update tests from Apache Commons IO 2.5 to 2.6. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/0e39fe3b Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/0e39fe3b Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/0e39fe3b Branch: refs/heads/release Commit: 0e39fe3bed3444e1b989c2a0a90c1d8e6bb36ccc Parents: 27cdc55 Author: Gary Gregory Authored: Fri Oct 20 10:04:51 2017 -0600 Committer: Gary Gregory Committed: Fri Oct 20 10:04:51 2017 -0600 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/0e39fe3b/pom.xml -- diff --git a/pom.xml b/pom.xml index 8011872..526faa7 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ CSV files of various types. commons-io commons-io - 2.5 + 2.6 test
[40/48] commons-csv git commit: Remove duplicated code by calling printRecords(Iterable)
Remove duplicated code by calling printRecords(Iterable) Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/7694e8f9 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/7694e8f9 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/7694e8f9 Branch: refs/heads/release Commit: 7694e8f99972f33b2e285ea2652a1b21a1c6b653 Parents: 676a580 Author: Benedikt Ritter Authored: Tue Aug 21 22:05:47 2018 +0200 Committer: Benedikt Ritter Committed: Tue Aug 21 22:05:47 2018 +0200 -- src/main/java/org/apache/commons/csv/CSVPrinter.java | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/7694e8f9/src/main/java/org/apache/commons/csv/CSVPrinter.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVPrinter.java b/src/main/java/org/apache/commons/csv/CSVPrinter.java index d639c60..3ae5971 100644 --- a/src/main/java/org/apache/commons/csv/CSVPrinter.java +++ b/src/main/java/org/apache/commons/csv/CSVPrinter.java @@ -26,6 +26,7 @@ import java.io.Flushable; import java.io.IOException; import java.sql.ResultSet; import java.sql.SQLException; +import java.util.Arrays; /** * Prints values in a CSV format. @@ -321,15 +322,7 @@ public final class CSVPrinter implements Flushable, Closeable { * If an I/O error occurs */ public void printRecords(final Object... values) throws IOException { -for (final Object value : values) { -if (value instanceof Object[]) { -this.printRecord((Object[]) value); -} else if (value instanceof Iterable) { -this.printRecord((Iterable) value); -} else { -this.printRecord(value); -} -} +printRecords(Arrays.asList(values)); } /**
[13/48] commons-csv git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/commons-csv.git
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/commons-csv.git Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/1521cc28 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/1521cc28 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/1521cc28 Branch: refs/heads/release Commit: 1521cc285daf9923d09bd112892647c60e59a750 Parents: 0e39fe3 d20e5ab Author: Gary Gregory Authored: Fri Oct 20 17:27:45 2017 -0600 Committer: Gary Gregory Committed: Fri Oct 20 17:27:45 2017 -0600 -- .travis.yml | 1 + pom.xml | 16 2 files changed, 17 insertions(+) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/1521cc28/pom.xml --
[34/48] commons-csv git commit: The the patrol.
The the patrol. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/ea13687e Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/ea13687e Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/ea13687e Branch: refs/heads/release Commit: ea13687e6637fc50ff5c38585c26b57fbf811a3c Parents: 98d4407 Author: Gary Gregory Authored: Sat Jun 16 15:44:55 2018 -0600 Committer: Gary Gregory Committed: Sat Jun 16 15:44:55 2018 -0600 -- src/main/java/org/apache/commons/csv/CSVFormat.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/ea13687e/src/main/java/org/apache/commons/csv/CSVFormat.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index ae96b1e..a74e47b 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -1943,7 +1943,7 @@ public final class CSVFormat implements Serializable { /** * Returns a new {@code CSVFormat} with skipping the header record set to {@code true}. * - * @return A new CSVFormat that is equal to this but with the the specified skipHeaderRecord setting. + * @return A new CSVFormat that is equal to this but with the specified skipHeaderRecord setting. * @see #withSkipHeaderRecord(boolean) * @see #withHeader(String...) * @since 1.1 @@ -1958,7 +1958,7 @@ public final class CSVFormat implements Serializable { * @param skipHeaderRecord *whether to skip the header record. * - * @return A new CSVFormat that is equal to this but with the the specified skipHeaderRecord setting. + * @return A new CSVFormat that is equal to this but with the specified skipHeaderRecord setting. * @see #withHeader(String...) */ public CSVFormat withSkipHeaderRecord(final boolean skipHeaderRecord) {
[46/48] commons-csv git commit: Adopt commons-jcs way of generating SHA-512 checksums
Adopt commons-jcs way of generating SHA-512 checksums Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/79adf78d Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/79adf78d Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/79adf78d Branch: refs/heads/release Commit: 79adf78d231388350b8c8fb2fd16b7810e332620 Parents: af261c8 Author: Benedikt Ritter Authored: Wed Sep 19 10:51:35 2018 +0200 Committer: Benedikt Ritter Committed: Wed Sep 19 10:51:35 2018 +0200 -- pom.xml | 39 +++ 1 file changed, 39 insertions(+) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/79adf78d/pom.xml -- diff --git a/pom.xml b/pom.xml index 3fa6dd4..d694794 100644 --- a/pom.xml +++ b/pom.xml @@ -242,6 +242,45 @@ CSV files of various types. + + + +net.nicoulaj.maven.plugins +checksum-maven-plugin +1.7 + + +generate.checksums +verify + + files + + + + + +SHA-512 + + false + + + ${project.build.directory} + + ${project.artifactId}-${project.version}-src.zip + + ${project.artifactId}-${project.version}-src.tar.gz + + ${project.artifactId}-${project.version}-bin.zip + + ${project.artifactId}-${project.version}-bin.tar.gz + + + + + +
[04/48] commons-csv git commit: [CSV-217] Add autoFlush option for CsvPrinter. Applying modified patch This closes #24.
[CSV-217] Add autoFlush option for CsvPrinter. Applying modified patch This closes #24. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/7e471527 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/7e471527 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/7e471527 Branch: refs/heads/release Commit: 7e471527915cb0c73316c598fd02b71a56f2cf43 Parents: 10977ae Author: Korolyov Alexei Authored: Mon Oct 9 13:22:53 2017 -0600 Committer: Gary Gregory Committed: Mon Oct 9 13:22:53 2017 -0600 -- pom.xml | 6 ++ src/changes/changes.xml | 1 + .../java/org/apache/commons/csv/CSVFormat.java | 75 ++-- .../java/org/apache/commons/csv/CSVPrinter.java | 17 + .../org/apache/commons/csv/CSVPrinterTest.java | 55 ++ 5 files changed, 131 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/7e471527/pom.xml -- diff --git a/pom.xml b/pom.xml index 262bc17..8b13c17 100644 --- a/pom.xml +++ b/pom.xml @@ -39,6 +39,12 @@ CSV files of various types. test + org.mockito + mockito-all + 1.9.5 + test + + commons-io commons-io 2.5 http://git-wip-us.apache.org/repos/asf/commons-csv/blob/7e471527/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index bbfa930..b56b75f 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -39,6 +39,7 @@ + Add autoFlush option for CsvPrinter. PR #24. withNullString value is printed without quotes when QuoteMode.ALL is specified; add QuoteMode.ALL_NON_NULL. PR #17. http://git-wip-us.apache.org/repos/asf/commons-csv/blob/7e471527/src/main/java/org/apache/commons/csv/CSVFormat.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index 410c8fb..29b7c36 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -242,7 +242,7 @@ public final class CSVFormat implements Serializable { * @see Predefined#Default */ public static final CSVFormat DEFAULT = new CSVFormat(COMMA, DOUBLE_QUOTE_CHAR, null, null, null, false, true, CRLF, -null, null, null, false, false, false, false, false); +null, null, null, false, false, false, false, false, false); /** * Excel file format (using a comma as the value delimiter). Note that the actual value delimiter used by Excel is @@ -537,7 +537,7 @@ public final class CSVFormat implements Serializable { */ public static CSVFormat newFormat(final char delimiter) { return new CSVFormat(delimiter, null, null, null, null, false, false, null, null, null, null, false, false, -false, false, false); +false, false, false, false); } /** @@ -584,6 +584,8 @@ public final class CSVFormat implements Serializable { private final boolean trim; +private final boolean autoFlush; + /** * Creates a customized CSV format. * @@ -619,15 +621,16 @@ public final class CSVFormat implements Serializable { *TODO * @param trailingDelimiter *TODO + * @param autoFlush * @throws IllegalArgumentException * if the delimiter is a line break character */ private CSVFormat(final char delimiter, final Character quoteChar, final QuoteMode quoteMode, -final Character commentStart, final Character escape, final boolean ignoreSurroundingSpaces, -final boolean ignoreEmptyLines, final String recordSeparator, final String nullString, -final Object[] headerComments, final String[] header, final boolean skipHeaderRecord, -final boolean allowMissingColumnNames, final boolean ignoreHeaderCase, final boolean trim, -final boolean trailingDelimiter) { + final Character commentStart, final Character escape, final boolean ignoreSurroundingSpaces, + final boolean ignoreEmptyLines, final String recordSeparator, final String nullString, + final Object[] headerComments, final String[] header, final boolean skipHeaderRecord, + final boolean allowMissingColumnNames, final boolean ignoreHeaderCase, final boolean trim, + final boolean trailingDelimiter, boolean
[43/48] commons-csv git commit: Remove empty paragraph from JavaDoc
Remove empty paragraph from JavaDoc Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/4e1802db Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/4e1802db Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/4e1802db Branch: refs/heads/release Commit: 4e1802db96a352d244b1a5d53cfea1414952eeb1 Parents: 71459b6 Author: Benedikt Ritter Authored: Fri Aug 31 10:51:00 2018 +0200 Committer: Benedikt Ritter Committed: Fri Aug 31 10:51:00 2018 +0200 -- src/main/java/org/apache/commons/csv/CSVPrinter.java | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/4e1802db/src/main/java/org/apache/commons/csv/CSVPrinter.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVPrinter.java b/src/main/java/org/apache/commons/csv/CSVPrinter.java index ccf4bff..70e3bed 100644 --- a/src/main/java/org/apache/commons/csv/CSVPrinter.java +++ b/src/main/java/org/apache/commons/csv/CSVPrinter.java @@ -64,7 +64,6 @@ import java.util.Arrays; * * 2,mary,Mary,Meyer,1985-03-29 * - * */ public final class CSVPrinter implements Flushable, Closeable {
[23/48] commons-csv git commit: [CSV-223] Inconsistency between Javadoc of CSVFormat DEFAULT EXCEL. Apply modified patch from Samuel Martin. Closes #26.
[CSV-223] Inconsistency between Javadoc of CSVFormat DEFAULT EXCEL. Apply modified patch from Samuel Martin. Closes #26. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/83cd8088 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/83cd8088 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/83cd8088 Branch: refs/heads/release Commit: 83cd8088a63db894a0358e3ad5abbecc83964f3a Parents: eede739 Author: Gary Gregory Authored: Tue Apr 3 13:45:05 2018 -0600 Committer: Gary Gregory Committed: Tue Apr 3 13:45:05 2018 -0600 -- src/changes/changes.xml | 1 + src/main/java/org/apache/commons/csv/CSVFormat.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/83cd8088/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 217c2ce..7297a18 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -43,6 +43,7 @@ The behavior of quote char using is not similar as Excel does when the first string contains CJK char(s). Don't quote cells just because they have UTF-8 encoded characters. Add API org.apache.commons.csv.CSVFormat.withSystemRecordSeparator(). + Inconsistency between Javadoc of CSVFormat DEFAULT EXCEL. withNullString value is printed without quotes when QuoteMode.ALL is specified; add QuoteMode.ALL_NON_NULL. PR #17. http://git-wip-us.apache.org/repos/asf/commons-csv/blob/83cd8088/src/main/java/org/apache/commons/csv/CSVFormat.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index 10f766d..d7698ab 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -267,8 +267,8 @@ public final class CSVFormat implements Serializable { * {@link #withAllowMissingColumnNames(boolean) withAllowMissingColumnNames(true)} * * - * Note: this is currently like {@link #RFC4180} plus {@link #withAllowMissingColumnNames(boolean) - * withAllowMissingColumnNames(true)}. + * Note: This is currently like {@link #RFC4180} plus {@link #withAllowMissingColumnNames(boolean) + * withAllowMissingColumnNames(true)} and {@link #withIgnoreEmptyLines(boolean) withIgnoreEmptyLines(false)}. * * * @see Predefined#Excel
[06/48] commons-csv git commit: [CSV-217] Add autoFlush option for CsvPrinter. Remove println() in test.
[CSV-217] Add autoFlush option for CsvPrinter. Remove println() in test. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/3c0a73b3 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/3c0a73b3 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/3c0a73b3 Branch: refs/heads/release Commit: 3c0a73b30f1969136987f25227383ae9d233e4c1 Parents: 9c20341 Author: Gary Gregory Authored: Mon Oct 9 13:24:47 2017 -0600 Committer: Gary Gregory Committed: Mon Oct 9 13:24:47 2017 -0600 -- src/test/java/org/apache/commons/csv/CSVPrinterTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/3c0a73b3/src/test/java/org/apache/commons/csv/CSVPrinterTest.java -- diff --git a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java index 893675c..30eb652 100644 --- a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java +++ b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java @@ -1347,7 +1347,7 @@ public class CSVPrinterTest { @Test public void testCloseWithCsvFormatAutoFlushOn() throws IOException { -System.out.println("start method"); +// System.out.println("start method"); Writer writer = mock(Writer.class); CSVFormat csvFormat = CSVFormat.DEFAULT.withAutoFlush(true); try (CSVPrinter csvPrinter = new CSVPrinter(writer, csvFormat)) {
[18/48] commons-csv git commit: Sort methods.
Sort methods. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/4f58df6d Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/4f58df6d Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/4f58df6d Branch: refs/heads/release Commit: 4f58df6d4a41ef489ed117fb58a93b68328ec5ed Parents: 8b3de71 Author: Gary Gregory Authored: Mon Dec 11 11:42:09 2017 -0700 Committer: Gary Gregory Committed: Mon Dec 11 11:42:09 2017 -0700 -- .../org/apache/commons/csv/CSVFormatTest.java | 824 +-- 1 file changed, 412 insertions(+), 412 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/4f58df6d/src/test/java/org/apache/commons/csv/CSVFormatTest.java -- diff --git a/src/test/java/org/apache/commons/csv/CSVFormatTest.java b/src/test/java/org/apache/commons/csv/CSVFormatTest.java index 7eb0ce5..9a69780 100644 --- a/src/test/java/org/apache/commons/csv/CSVFormatTest.java +++ b/src/test/java/org/apache/commons/csv/CSVFormatTest.java @@ -44,6 +44,13 @@ import org.junit.Test; */ public class CSVFormatTest { +public enum EmptyEnum { +} + +public enum Header { +Name, Email, Phone +} + private static void assertNotEquals(final Object right, final Object left) { assertFalse(right.equals(left)); assertFalse(left.equals(right)); @@ -164,14 +171,6 @@ public class CSVFormatTest { } @Test -public void testEqualsQuoteChar() { -final CSVFormat right = CSVFormat.newFormat('\'').withQuote('"'); -final CSVFormat left = right.withQuote('!'); - -assertNotEquals(right, left); -} - -@Test public void testEqualsLeftNoQuoteRightQuote() { final CSVFormat left = CSVFormat.newFormat(',').withQuote(null); final CSVFormat right = left.withQuote('#'); @@ -188,34 +187,172 @@ public class CSVFormatTest { } @Test -public void testEqualsQuotePolicy() { +public void testEqualsNullString() { final CSVFormat right = CSVFormat.newFormat('\'') +.withRecordSeparator(CR) +.withCommentMarker('#') +.withEscape('+') +.withIgnoreEmptyLines() +.withIgnoreSurroundingSpaces() .withQuote('"') -.withQuoteMode(QuoteMode.ALL); +.withQuoteMode(QuoteMode.ALL) +.withNullString("null"); final CSVFormat left = right -.withQuoteMode(QuoteMode.MINIMAL); +.withNullString("---"); assertNotEquals(right, left); } @Test -public void testEqualsRecordSeparator() { +public void testEqualsOne() { + +final CSVFormat cSVFormatOne = CSVFormat.INFORMIX_UNLOAD; +final CSVFormat cSVFormatTwo = CSVFormat.MYSQL; + + +assertEquals('\\', (char)cSVFormatOne.getEscapeCharacter()); +assertNull(cSVFormatOne.getQuoteMode()); + +assertTrue(cSVFormatOne.getIgnoreEmptyLines()); +assertFalse(cSVFormatOne.getSkipHeaderRecord()); + +assertFalse(cSVFormatOne.getIgnoreHeaderCase()); +assertNull(cSVFormatOne.getCommentMarker()); + +assertFalse(cSVFormatOne.isCommentMarkerSet()); +assertTrue(cSVFormatOne.isQuoteCharacterSet()); + +assertEquals('|', cSVFormatOne.getDelimiter()); +assertFalse(cSVFormatOne.getAllowMissingColumnNames()); + +assertTrue(cSVFormatOne.isEscapeCharacterSet()); +assertEquals("\n", cSVFormatOne.getRecordSeparator()); + +assertEquals('\"', (char)cSVFormatOne.getQuoteCharacter()); +assertFalse(cSVFormatOne.getTrailingDelimiter()); + +assertFalse(cSVFormatOne.getTrim()); +assertFalse(cSVFormatOne.isNullStringSet()); + +assertNull(cSVFormatOne.getNullString()); +assertFalse(cSVFormatOne.getIgnoreSurroundingSpaces()); + + +assertTrue(cSVFormatTwo.isEscapeCharacterSet()); +assertNull(cSVFormatTwo.getQuoteCharacter()); + +assertFalse(cSVFormatTwo.getAllowMissingColumnNames()); +assertEquals(QuoteMode.ALL_NON_NULL, cSVFormatTwo.getQuoteMode()); + +assertEquals('\t', cSVFormatTwo.getDelimiter()); +assertEquals("\n", cSVFormatTwo.getRecordSeparator()); + +assertFalse(cSVFormatTwo.isQuoteCharacterSet()); +assertTrue(cSVFormatTwo.isNullStringSet()); + +assertEquals('\\', (char)cSVFormatTwo.getEscapeCharacter()); +assertFalse(cSVFormatTwo.getIgnoreHeaderCase()); + +assertFalse(cSVFormatTwo.getTrim()); +assertFalse(cSVFormatTwo.getIgnoreEmptyLines()); + +assertEquals("\\N", cSVFormatTwo.getNullString()); +
[33/48] commons-csv git commit: Normalize caps.
Normalize caps. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/98d44079 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/98d44079 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/98d44079 Branch: refs/heads/release Commit: 98d44079386039f3a6b2ecb8ba7b9165567fdf8d Parents: 05e2f77 Author: Gary Gregory Authored: Tue Jun 5 09:06:13 2018 -0600 Committer: Gary Gregory Committed: Tue Jun 5 09:06:13 2018 -0600 -- src/changes/changes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/98d44079/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 21229a3..dd56857 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -45,7 +45,7 @@ Add API org.apache.commons.csv.CSVFormat.withSystemRecordSeparator(). Inconsistency between Javadoc of CSVFormat DEFAULT EXCEL. Create CSVFormat.ORACLE preset. - Some Multi Iterator Parsing Peek Sequences Incorrectly Consume Elements. + Some multi-iterator parsing peek sequences incorrectly consume elements. Parse method should avoid creating a redundant BufferedReader.
[38/48] commons-csv git commit: Update tests from Apache Commons Lang 3.7 to 3.8.
Update tests from Apache Commons Lang 3.7 to 3.8. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/47dbc8fd Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/47dbc8fd Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/47dbc8fd Branch: refs/heads/release Commit: 47dbc8fd1e1bdad8970c804e4ecde2ed3af07784 Parents: 768f656 Author: Gary Gregory Authored: Tue Aug 21 09:07:58 2018 -0600 Committer: Gary Gregory Committed: Tue Aug 21 09:07:58 2018 -0600 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/47dbc8fd/pom.xml -- diff --git a/pom.xml b/pom.xml index 3beeffc..f9491cf 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ CSV files of various types. org.apache.commons commons-lang3 - 3.7 + 3.8 test
[28/48] commons-csv git commit: Fix compiler warning.
Fix compiler warning. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/33f662b2 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/33f662b2 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/33f662b2 Branch: refs/heads/release Commit: 33f662b219b439af5134de4553a1bb9485136999 Parents: 5c0d27c Author: Gary Gregory Authored: Fri May 18 13:47:37 2018 -0600 Committer: Gary Gregory Committed: Fri May 18 13:47:37 2018 -0600 -- .../org/apache/commons/csv/CSVPrinterTest.java | 39 ++-- 1 file changed, 20 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/33f662b2/src/test/java/org/apache/commons/csv/CSVPrinterTest.java -- diff --git a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java index 36308c5..45c8445 100644 --- a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java +++ b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java @@ -1352,33 +1352,34 @@ public class CSVPrinterTest { @Test public void testCloseBackwardCompatibility() throws IOException { -final Writer writer = mock(Writer.class); -final CSVFormat csvFormat = CSVFormat.DEFAULT; -try (CSVPrinter csvPrinter = new CSVPrinter(writer, csvFormat)) { -} -verify(writer, never()).flush(); -verify(writer, times(1)).close(); -} +try (final Writer writer = mock(Writer.class)) { +final CSVFormat csvFormat = CSVFormat.DEFAULT; +try (CSVPrinter csvPrinter = new CSVPrinter(writer, csvFormat)) { +} +verify(writer, never()).flush(); +verify(writer, times(1)).close(); +}} @Test public void testCloseWithCsvFormatAutoFlushOn() throws IOException { // System.out.println("start method"); -final Writer writer = mock(Writer.class); -final CSVFormat csvFormat = CSVFormat.DEFAULT.withAutoFlush(true); -try (CSVPrinter csvPrinter = new CSVPrinter(writer, csvFormat)) { -} -verify(writer, times(1)).flush(); -verify(writer, times(1)).close(); -} +try (final Writer writer = mock(Writer.class)) { +final CSVFormat csvFormat = CSVFormat.DEFAULT.withAutoFlush(true); +try (CSVPrinter csvPrinter = new CSVPrinter(writer, csvFormat)) { +} +verify(writer, times(1)).flush(); +verify(writer, times(1)).close(); +}} @Test public void testCloseWithCsvFormatAutoFlushOff() throws IOException { -final Writer writer = mock(Writer.class); -final CSVFormat csvFormat = CSVFormat.DEFAULT.withAutoFlush(false); -try (CSVPrinter csvPrinter = new CSVPrinter(writer, csvFormat)) { +try (final Writer writer = mock(Writer.class)) { +final CSVFormat csvFormat = CSVFormat.DEFAULT.withAutoFlush(false); +try (CSVPrinter csvPrinter = new CSVPrinter(writer, csvFormat)) { +} +verify(writer, never()).flush(); +verify(writer, times(1)).close(); } -verify(writer, never()).flush(); -verify(writer, times(1)).close(); } }
[26/48] commons-csv git commit: Typo: 'JavaDoc' -> 'Javadoc'.
Typo: 'JavaDoc' -> 'Javadoc'. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/c00f4d42 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/c00f4d42 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/c00f4d42 Branch: refs/heads/release Commit: c00f4d426ecf7f58071a41a1d3fad7efbacf9777 Parents: 00583b2 Author: Gary Gregory Authored: Tue May 15 12:21:56 2018 -0600 Committer: Gary Gregory Committed: Tue May 15 12:21:56 2018 -0600 -- README.md | 2 +- src/main/java/org/apache/commons/csv/CSVParser.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/c00f4d42/README.md -- diff --git a/README.md b/README.md index 87f1c60..68b7aa4 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Documentation - More information can be found on the [Apache Commons CSV homepage](https://commons.apache.org/proper/commons-csv). -The [JavaDoc](https://commons.apache.org/proper/commons-csv/javadocs/api-release) can be browsed. +The [Javadoc](https://commons.apache.org/proper/commons-csv/javadocs/api-release) can be browsed. Questions related to the usage of Apache Commons CSV should be posted to the [user mailing list][ml]. Where can I get the latest release? http://git-wip-us.apache.org/repos/asf/commons-csv/blob/c00f4d42/src/main/java/org/apache/commons/csv/CSVParser.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVParser.java b/src/main/java/org/apache/commons/csv/CSVParser.java index 06108f6..2a902cd 100644 --- a/src/main/java/org/apache/commons/csv/CSVParser.java +++ b/src/main/java/org/apache/commons/csv/CSVParser.java @@ -99,7 +99,7 @@ import java.util.TreeMap; * * * If the predefined formats don't match the format at hands, custom formats can be defined. More information about - * customising CSVFormats is available in {@link CSVFormat CSVFormat JavaDoc}. + * customising CSVFormats is available in {@link CSVFormat CSVFormat Javadoc}. * * * Parsing into memory
[24/48] commons-csv git commit: [CSV-209] Create CSVFormat.ORACLE preset. Also: Fix and complete documentation for other formats.
[CSV-209] Create CSVFormat.ORACLE preset. Also: Fix and complete documentation for other formats. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/a9daab69 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/a9daab69 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/a9daab69 Branch: refs/heads/release Commit: a9daab6992bc800e510de180aa3e49522a0db462 Parents: 83cd808 Author: Gary Gregory Authored: Tue Apr 3 17:37:03 2018 -0600 Committer: Gary Gregory Committed: Tue Apr 3 17:37:03 2018 -0600 -- src/changes/changes.xml | 1 + .../java/org/apache/commons/csv/CSVFormat.java | 52 ++-- src/site/xdoc/index.xml | 3 ++ src/site/xdoc/user-guide.xml| 16 +++--- .../commons/csv/CSVFormatPredefinedTest.java| 5 ++ .../org/apache/commons/csv/CSVPrinterTest.java | 6 +++ 6 files changed, 72 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/a9daab69/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 7297a18..14acb0a 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -44,6 +44,7 @@ Don't quote cells just because they have UTF-8 encoded characters. Add API org.apache.commons.csv.CSVFormat.withSystemRecordSeparator(). Inconsistency between Javadoc of CSVFormat DEFAULT EXCEL. + Create CSVFormat.ORACLE preset. withNullString value is printed without quotes when QuoteMode.ALL is specified; add QuoteMode.ALL_NON_NULL. PR #17. http://git-wip-us.apache.org/repos/asf/commons-csv/blob/a9daab69/src/main/java/org/apache/commons/csv/CSVFormat.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index d7698ab..ae96b1e 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -190,6 +190,11 @@ public final class CSVFormat implements Serializable { MySQL(CSVFormat.MYSQL), /** + * @see CSVFormat#ORACLE + */ +Oracle(CSVFormat.ORACLE), + +/** * @see CSVFormat#POSTGRESQL_CSV * @since 1.5 */ @@ -227,7 +232,7 @@ public final class CSVFormat implements Serializable { } /** - * Standard comma separated format, as for {@link #RFC4180} but allowing empty lines. + * Standard Comma Separated Value format, as for {@link #RFC4180} but allowing empty lines. * * * Settings are: @@ -378,6 +383,44 @@ public final class CSVFormat implements Serializable { // @formatter:off /** + * Default Oracle format used by the SQL*Loader utility. + * + * + * This is a comma-delimited format with the system line separator character as the record separator. Values are double quoted when needed and special + * characters are escaped with {@code '"'}. The default NULL string is {@code ""}. Values are trimmed. + * + * + * + * Settings are: + * + * + * withDelimiter(',') // default is {@code FIELDS TERMINATED BY ','} + * withQuote('"') // default is {@code OPTIONALLY ENCLOSED BY '"'} + * withSystemRecordSeparator() + * withTrim() + * withIgnoreEmptyLines(false) + * withEscape('\\') + * withNullString("\\N") + * withQuoteMode(QuoteMode.MINIMAL) + * + * + * @see Predefined#Oracle + * @see https://docs.oracle.com/database/121/SUTIL/GUID-D1762699-8154-40F6-90DE-EFB8EB6A9AB0.htm#SUTIL4217;>https://docs.oracle.com/database/121/SUTIL/GUID-D1762699-8154-40F6-90DE-EFB8EB6A9AB0.htm#SUTIL4217 + * @since 1.6 + */ +// @formatter:off +public static final CSVFormat ORACLE = DEFAULT +.withDelimiter(COMMA) +.withEscape(BACKSLASH) +.withIgnoreEmptyLines(false) +.withQuote(DOUBLE_QUOTE_CHAR) +.withNullString("\\N") +.withTrim() +.withSystemRecordSeparator() +.withQuoteMode(QuoteMode.MINIMAL); +// @formatter:off + +/** * Default PostgreSQL CSV format used by the {@code COPY} operation. * * @@ -399,7 +442,7 @@ public final class CSVFormat implements Serializable { * * * @see Predefined#MySQL - * @see http://dev.mysql.com/doc/refman/5.1/en/load-data.html;> http://dev.mysql.com/doc/refman/5.1/en/load + * @see https://www.postgresql.org/docs/current/static/sql-copy.html;> https://www.postgresql.org/docs/current/static/sql-copy.html *
[25/48] commons-csv git commit: Update release for 1.6 to this year.
Update release for 1.6 to this year. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/00583b2a Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/00583b2a Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/00583b2a Branch: refs/heads/release Commit: 00583b2ad9f83f4bd30d0c48af6e905beb47fd49 Parents: a9daab6 Author: Gary Gregory Authored: Tue Apr 3 17:37:27 2018 -0600 Committer: Gary Gregory Committed: Tue Apr 3 17:37:27 2018 -0600 -- src/changes/changes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/00583b2a/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 14acb0a..8142c21 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -38,7 +38,7 @@ Release Notes - + Add autoFlush option for CsvPrinter. PR #24. The behavior of quote char using is not similar as Excel does when the first string contains CJK char(s). Don't quote cells just because they have UTF-8 encoded characters.
[42/48] commons-csv git commit: CSV-231: Add more documentation to CSVPrinter
CSV-231: Add more documentation to CSVPrinter Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/71459b6d Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/71459b6d Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/71459b6d Branch: refs/heads/release Commit: 71459b6d30135723608b06c6ee7a9307b34edaea Parents: e5b2413 Author: Benedikt Ritter Authored: Fri Aug 31 10:29:12 2018 +0200 Committer: Benedikt Ritter Committed: Fri Aug 31 10:29:12 2018 +0200 -- src/changes/changes.xml | 1 + .../java/org/apache/commons/csv/CSVPrinter.java | 45 +++- 2 files changed, 44 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/71459b6d/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index dd56857..607b979 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -39,6 +39,7 @@ + Add more documentation to CSVPrinter. Add autoFlush option for CsvPrinter. PR #24. The behavior of quote char using is not similar as Excel does when the first string contains CJK char(s). Don't quote cells just because they have UTF-8 encoded characters. http://git-wip-us.apache.org/repos/asf/commons-csv/blob/71459b6d/src/main/java/org/apache/commons/csv/CSVPrinter.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVPrinter.java b/src/main/java/org/apache/commons/csv/CSVPrinter.java index 3ae5971..ccf4bff 100644 --- a/src/main/java/org/apache/commons/csv/CSVPrinter.java +++ b/src/main/java/org/apache/commons/csv/CSVPrinter.java @@ -29,7 +29,42 @@ import java.sql.SQLException; import java.util.Arrays; /** - * Prints values in a CSV format. + * Prints values in a {@link CSVFormat CSV format}. + * + * Values can be appended to the output by calling the {@link #print(Object)} method. + * Values are printed according to {@link String#valueOf(Object)}. + * To complete a record the {@link #println()} method has to be called. + * Comments can be appended by calling {@link #printComment(String)}. + * However a comment will only be written to the output if the {@link CSVFormat} supports comments. + * + * + * The printer also supports appending a complete record at once by calling {@link #printRecord(Object...)} + * or {@link #printRecord(Iterable)}. + * Furthermore {@link #printRecords(Object...)}, {@link #printRecords(Iterable)} and {@link #printRecords(ResultSet)} + * methods can be used to print several records at once. + * + * + * Example: + * + * + * try (CSVPrinter printer = new CSVPrinter(new FileWriter("csv.txt"), CSVFormat.EXCEL)) { + * printer.printRecord("id", "userName", "firstName", "lastName", "birthday"); + * printer.printRecord(1, "john73", "John", "Doe", LocalDate.of(1973, 9, 15)); + * printer.println(); + * printer.printRecord(2, "mary", "Mary", "Meyer", LocalDate.of(1985, 3, 29)); + * } catch (IOException ex) { + * ex.printStackTrace(); + * } + * + * + * This code will write the following to csv.txt: + * + * id,userName,firstName,lastName,birthday + * 1,john73,John,Doe,1973-09-15 + * + * 2,mary,Mary,Meyer,1985-03-29 + * + * */ public final class CSVPrinter implements Flushable, Closeable { @@ -141,11 +176,17 @@ public final class CSVPrinter implements Flushable, Closeable { * Prints a comment on a new line among the delimiter separated values. * * - * Comments will always begin on a new line and occupy a least one full line. The character specified to start + * Comments will always begin on a new line and occupy at least one full line. The character specified to start * comments and a space will be inserted at the beginning of each new line in the comment. * * + * * If comments are disabled in the current CSV format this method does nothing. + * + * + * This method detects line breaks inside the comment string and inserts {@link CSVFormat#getRecordSeparator()} + * to start a new line of the comment. Note that this might produce unexpected results for formats that do not use + * line breaks as record separator. * * @param comment *the comment to output
[20/48] commons-csv git commit: [CSV-220] Add API org.apache.commons.csv.CSVFormat.withSystemRecordSeparator().
[CSV-220] Add API org.apache.commons.csv.CSVFormat.withSystemRecordSeparator(). Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/3a203443 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/3a203443 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/3a203443 Branch: refs/heads/release Commit: 3a2034434cf29e241378f5f0cdbb9be6cf01eaba Parents: 34262e8 Author: Gary Gregory Authored: Mon Dec 11 11:50:31 2017 -0700 Committer: Gary Gregory Committed: Mon Dec 11 11:50:31 2017 -0700 -- src/changes/changes.xml | 1 + src/main/java/org/apache/commons/csv/CSVFormat.java | 16 .../java/org/apache/commons/csv/CSVFormatTest.java | 8 +++- 3 files changed, 24 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/3a203443/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 302632e..217c2ce 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -42,6 +42,7 @@ Add autoFlush option for CsvPrinter. PR #24. The behavior of quote char using is not similar as Excel does when the first string contains CJK char(s). Don't quote cells just because they have UTF-8 encoded characters. + Add API org.apache.commons.csv.CSVFormat.withSystemRecordSeparator(). withNullString value is printed without quotes when QuoteMode.ALL is specified; add QuoteMode.ALL_NON_NULL. PR #17. http://git-wip-us.apache.org/repos/asf/commons-csv/blob/3a203443/src/main/java/org/apache/commons/csv/CSVFormat.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index 9e6c807..10f766d 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -1926,6 +1926,22 @@ public final class CSVFormat implements Serializable { } /** + * Returns a new {@code CSVFormat} with the record separator of the format set to the operating system's line + * separator string, typically CR+LF on Windows and LF on Linux. + * + * + * Note: This setting is only used during printing and does not affect parsing. Parsing currently + * only works for inputs with '\n', '\r' and "\r\n" + * + * + * @return A new CSVFormat that is equal to this but with the operating system's line separator stringr + * @since 1.6 + */ +public CSVFormat withSystemRecordSeparator() { +return withRecordSeparator(System.getProperty("line.separator")); +} + +/** * Returns a new {@code CSVFormat} to add a trailing delimiter. * * @return A new CSVFormat that is equal to this but with the trailing delimiter setting. http://git-wip-us.apache.org/repos/asf/commons-csv/blob/3a203443/src/test/java/org/apache/commons/csv/CSVFormatTest.java -- diff --git a/src/test/java/org/apache/commons/csv/CSVFormatTest.java b/src/test/java/org/apache/commons/csv/CSVFormatTest.java index 9a69780..6a96c7c 100644 --- a/src/test/java/org/apache/commons/csv/CSVFormatTest.java +++ b/src/test/java/org/apache/commons/csv/CSVFormatTest.java @@ -640,7 +640,7 @@ public class CSVFormatTest { public void testToString() { final CSVFormat cSVFormat = CSVFormat.POSTGRESQL_TEXT; -final String string = cSVFormat.INFORMIX_UNLOAD.toString(); +final String string = CSVFormat.INFORMIX_UNLOAD.toString(); assertEquals("Delimiter=<|> Escape=<\\> QuoteChar=<\"> RecordSeparator=<\n> EmptyLines:ignored SkipHeaderRecord:false", string); @@ -1090,4 +1090,10 @@ public class CSVFormatTest { assertEquals(String.valueOf(LF), formatWithRecordSeparator.getRecordSeparator()); } +@Test +public void testWithSystemRecordSeparator() throws Exception { +final CSVFormat formatWithRecordSeparator = CSVFormat.DEFAULT.withSystemRecordSeparator(); +assertEquals(System.getProperty("line.separator"), formatWithRecordSeparator.getRecordSeparator()); +} + }
[21/48] commons-csv git commit: Update to commons-parent version 43
Update to commons-parent version 43 Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/f3f48be1 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/f3f48be1 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/f3f48be1 Branch: refs/heads/release Commit: f3f48be1d08d87672aa80364f1d59df3daa11be1 Parents: 3a20344 Author: pascalschumacher Authored: Sun Jan 7 11:42:26 2018 +0100 Committer: pascalschumacher Committed: Sun Jan 7 11:42:26 2018 +0100 -- pom.xml | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/f3f48be1/pom.xml -- diff --git a/pom.xml b/pom.xml index 68fb8e2..3beeffc 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ org.apache.commons commons-parent -42 +43 commons-csv 1.6-SNAPSHOT @@ -152,9 +152,6 @@ CSV files of various types. 2.17 ${basedir}/LICENSE-header.txt LICENSE.txt, NOTICE.txt - - -0.7.9 @@ -274,7 +271,6 @@ CSV files of various types. org.codehaus.mojo findbugs-maven-plugin -3.0.5 org.codehaus.mojo @@ -522,8 +518,6 @@ CSV files of various types. 9 - -3.0.0-M1 true
[45/48] commons-csv git commit: Add temporary fix for COMMONSSITE-125
Add temporary fix for COMMONSSITE-125 Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/af261c8f Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/af261c8f Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/af261c8f Branch: refs/heads/release Commit: af261c8fbf29b215f8ab9ff66200948968ac28c0 Parents: 62515c5 Author: Benedikt Ritter Authored: Wed Sep 19 10:38:30 2018 +0200 Committer: Benedikt Ritter Committed: Wed Sep 19 10:38:30 2018 +0200 -- pom.xml | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/af261c8f/pom.xml -- diff --git a/pom.xml b/pom.xml index 5433ba2..3fa6dd4 100644 --- a/pom.xml +++ b/pom.xml @@ -155,6 +155,8 @@ CSV files of various types. https://svn.apache.org/repos/infra/websites/production/commons/content/proper/${project.artifactId} + + org.apache.commons.${commons.componentid}
[36/48] commons-csv git commit: Add missing predefined formats to class documentation
Add missing predefined formats to class documentation Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/3d4a7e67 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/3d4a7e67 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/3d4a7e67 Branch: refs/heads/release Commit: 3d4a7e6716af61a5462d81aa355229d9a4b52ae3 Parents: 39e8ee6 Author: Benedikt Ritter Authored: Mon Aug 20 08:47:20 2018 +0200 Committer: Benedikt Ritter Committed: Mon Aug 20 08:47:20 2018 +0200 -- src/main/java/org/apache/commons/csv/CSVFormat.java | 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/3d4a7e67/src/main/java/org/apache/commons/csv/CSVFormat.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index 10cc199..a0a83cc 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -58,8 +58,13 @@ import java.util.Set; * * {@link #DEFAULT} * {@link #EXCEL} + * {@link #INFORMIX_UNLOAD} + * {@link #INFORMIX_UNLOAD_CSV} * {@link #MYSQL} * {@link #RFC4180} + * {@link #ORACLE} + * {@link #POSTGRESQL_CSV} + * {@link #POSTGRESQL_TEXT} * {@link #TDF} * *
[11/48] commons-csv git commit: travis: add java 9 to build (closes #23)
travis: add java 9 to build (closes #23) pom.xml: add java 9 profile and override jacoco version to make build pass Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/d20e5aba Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/d20e5aba Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/d20e5aba Branch: refs/heads/release Commit: d20e5abaa3bd1718de4e5e8d1caf6b7dbdcfa021 Parents: 27cdc55 Author: Pascal Schumacher Authored: Mon Oct 2 12:02:32 2017 +0200 Committer: pascalschumacher Committed: Thu Oct 12 22:41:08 2017 +0200 -- .travis.yml | 1 + pom.xml | 16 2 files changed, 17 insertions(+) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/d20e5aba/.travis.yml -- diff --git a/.travis.yml b/.travis.yml index a697e28..d842196 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,7 @@ script: jdk: - openjdk7 - oraclejdk8 + - oraclejdk9 after_success: - mvn -B -V -Ptravis-jacoco clean test jacoco:report coveralls:report http://git-wip-us.apache.org/repos/asf/commons-csv/blob/d20e5aba/pom.xml -- diff --git a/pom.xml b/pom.xml index 8011872..e3533e3 100644 --- a/pom.xml +++ b/pom.xml @@ -152,6 +152,9 @@ CSV files of various types. 2.17 ${basedir}/LICENSE-header.txt LICENSE.txt, NOTICE.txt + + +0.7.9 @@ -512,6 +515,19 @@ CSV files of various types. + + + java9 + +9 + + + +3.0.0-M1 + +true + +
[32/48] commons-csv git commit: Remove trailing white spaces on all lines.
Remove trailing white spaces on all lines. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/05e2f776 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/05e2f776 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/05e2f776 Branch: refs/heads/release Commit: 05e2f7763a7abc8cf29074fdeed4f8bae1951165 Parents: f5a1968 Author: Gary Gregory Authored: Sat May 19 09:08:25 2018 -0600 Committer: Gary Gregory Committed: Sat May 19 09:08:25 2018 -0600 -- .../java/org/apache/commons/csv/CSVParser.java| 18 +- .../org/apache/commons/csv/CSVParserTest.java | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/05e2f776/src/main/java/org/apache/commons/csv/CSVParser.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVParser.java b/src/main/java/org/apache/commons/csv/CSVParser.java index ac45c72..6e121e8 100644 --- a/src/main/java/org/apache/commons/csv/CSVParser.java +++ b/src/main/java/org/apache/commons/csv/CSVParser.java @@ -287,7 +287,7 @@ public final class CSVParser implements Iterable, Closeable { private final Lexer lexer; private final CSVRecordIterator csvRecordIterator; - + /** A record buffer for getRecord(). Grows as necessary and is reused. */ private final List recordList = new ArrayList<>(); @@ -524,10 +524,10 @@ public final class CSVParser implements Iterable, Closeable { public Iterator iterator() { return csvRecordIterator; } - + class CSVRecordIterator implements Iterator { private CSVRecord current; - + private CSVRecord getNextRecord() { try { return CSVParser.this.nextRecord(); @@ -536,7 +536,7 @@ public final class CSVParser implements Iterable, Closeable { e.getClass().getSimpleName() + " reading next record: " + e.toString(), e); } } - + @Override public boolean hasNext() { if (CSVParser.this.isClosed()) { @@ -545,10 +545,10 @@ public final class CSVParser implements Iterable, Closeable { if (this.current == null) { this.current = this.getNextRecord(); } - + return this.current != null; } - + @Override public CSVRecord next() { if (CSVParser.this.isClosed()) { @@ -556,7 +556,7 @@ public final class CSVParser implements Iterable, Closeable { } CSVRecord next = this.current; this.current = null; - + if (next == null) { // hasNext() wasn't called before next = this.getNextRecord(); @@ -564,10 +564,10 @@ public final class CSVParser implements Iterable, Closeable { throw new NoSuchElementException("No more CSV records available"); } } - + return next; } - + @Override public void remove() { throw new UnsupportedOperationException(); http://git-wip-us.apache.org/repos/asf/commons-csv/blob/05e2f776/src/test/java/org/apache/commons/csv/CSVParserTest.java -- diff --git a/src/test/java/org/apache/commons/csv/CSVParserTest.java b/src/test/java/org/apache/commons/csv/CSVParserTest.java index 8336154..1e355f1 100644 --- a/src/test/java/org/apache/commons/csv/CSVParserTest.java +++ b/src/test/java/org/apache/commons/csv/CSVParserTest.java @@ -1103,7 +1103,7 @@ public class CSVParserTest { assertEquals(String.valueOf(recordNumber), record.get(0)); } } - + private void validateLineNumbers(final String lineSeparator) throws IOException { try (final CSVParser parser = CSVParser.parse("a" + lineSeparator + "b" + lineSeparator + "c", CSVFormat.DEFAULT.withRecordSeparator(lineSeparator))) {
[29/48] commons-csv git commit: [CSV-224] Some Multi Iterator Parsing Peek Sequences Incorrectly Consume Elements.
[CSV-224] Some Multi Iterator Parsing Peek Sequences Incorrectly Consume Elements. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/f368f64f Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/f368f64f Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/f368f64f Branch: refs/heads/release Commit: f368f64fa7f9acdcc01084f676e8b9c2b86f946e Parents: 33f662b Author: David Warshaw Authored: Fri May 18 14:24:50 2018 -0600 Committer: Gary Gregory Committed: Fri May 18 14:24:50 2018 -0600 -- src/changes/changes.xml | 1 + .../java/org/apache/commons/csv/CSVParser.java | 93 +++- .../org/apache/commons/csv/CSVParserTest.java | 56 3 files changed, 106 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/f368f64f/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 8142c21..d94ccdd 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -45,6 +45,7 @@ Add API org.apache.commons.csv.CSVFormat.withSystemRecordSeparator(). Inconsistency between Javadoc of CSVFormat DEFAULT EXCEL. Create CSVFormat.ORACLE preset. + Some Multi Iterator Parsing Peek Sequences Incorrectly Consume Elements. withNullString value is printed without quotes when QuoteMode.ALL is specified; add QuoteMode.ALL_NON_NULL. PR #17. http://git-wip-us.apache.org/repos/asf/commons-csv/blob/f368f64f/src/main/java/org/apache/commons/csv/CSVParser.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVParser.java b/src/main/java/org/apache/commons/csv/CSVParser.java index 2a902cd..7e9d7d4 100644 --- a/src/main/java/org/apache/commons/csv/CSVParser.java +++ b/src/main/java/org/apache/commons/csv/CSVParser.java @@ -286,6 +286,8 @@ public final class CSVParser implements Iterable, Closeable { private final Lexer lexer; +private final CSVRecordIterator csvRecordIterator; + /** A record buffer for getRecord(). Grows as necessary and is reused. */ private final List recordList = new ArrayList<>(); @@ -353,6 +355,7 @@ public final class CSVParser implements Iterable, Closeable { this.format = format; this.lexer = new Lexer(format, new ExtendedBufferedReader(reader)); +this.csvRecordIterator = new CSVRecordIterator(); this.headerMap = this.initializeHeader(); this.characterOffset = characterOffset; this.recordNumber = recordNumber - 1; @@ -519,55 +522,57 @@ public final class CSVParser implements Iterable, Closeable { */ @Override public Iterator iterator() { -return new Iterator() { -private CSVRecord current; - -private CSVRecord getNextRecord() { -try { -return CSVParser.this.nextRecord(); -} catch (final IOException e) { -throw new IllegalStateException( -e.getClass().getSimpleName() + " reading next record: " + e.toString(), e); -} +return csvRecordIterator; +} + +class CSVRecordIterator implements Iterator { +private CSVRecord current; + +private CSVRecord getNextRecord() { +try { +return CSVParser.this.nextRecord(); +} catch (final IOException e) { +throw new IllegalStateException( +e.getClass().getSimpleName() + " reading next record: " + e.toString(), e); } - -@Override -public boolean hasNext() { -if (CSVParser.this.isClosed()) { -return false; -} -if (this.current == null) { -this.current = this.getNextRecord(); -} - -return this.current != null; +} + +@Override +public boolean hasNext() { +if (CSVParser.this.isClosed()) { +return false; } - -@Override -public CSVRecord next() { -if (CSVParser.this.isClosed()) { -throw new NoSuchElementException("CSVParser has been closed"); -} -CSVRecord next = this.current; -this.current = null; - +if (this.current == null) { +this.current = this.getNextRecord(); +} + +return this.current != null; +} + +@Override +public CSVRecord next() { +if
[27/48] commons-csv git commit: Remove trailing whitespace.
Remove trailing whitespace. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/5c0d27c0 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/5c0d27c0 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/5c0d27c0 Branch: refs/heads/release Commit: 5c0d27c0e28797d86185d85c229c23e3adaa35d9 Parents: c00f4d4 Author: Gary Gregory Authored: Fri May 18 13:39:49 2018 -0600 Committer: Gary Gregory Committed: Fri May 18 13:39:49 2018 -0600 -- src/test/java/org/apache/commons/csv/CSVPrinterTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/5c0d27c0/src/test/java/org/apache/commons/csv/CSVPrinterTest.java -- diff --git a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java index 57a2568..36308c5 100644 --- a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java +++ b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java @@ -1187,7 +1187,7 @@ public class CSVPrinterTest { public void testRandomOracle() throws Exception { doRandom(CSVFormat.ORACLE, ITERATIONS_FOR_RANDOM_TEST); } - + @Test @Ignore public void testRandomPostgreSqlCsv() throws Exception {
[35/48] commons-csv git commit: Fix checkstyle errors
Fix checkstyle errors Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/39e8ee6f Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/39e8ee6f Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/39e8ee6f Branch: refs/heads/release Commit: 39e8ee6f9fcc1d294aa3fb2ba11fdc4c2d272521 Parents: ea13687 Author: Benedikt Ritter Authored: Mon Aug 20 08:40:30 2018 +0200 Committer: Benedikt Ritter Committed: Mon Aug 20 08:40:30 2018 +0200 -- src/main/java/org/apache/commons/csv/CSVFormat.java | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/39e8ee6f/src/main/java/org/apache/commons/csv/CSVFormat.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index a74e47b..10cc199 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -386,8 +386,9 @@ public final class CSVFormat implements Serializable { * Default Oracle format used by the SQL*Loader utility. * * - * This is a comma-delimited format with the system line separator character as the record separator. Values are double quoted when needed and special - * characters are escaped with {@code '"'}. The default NULL string is {@code ""}. Values are trimmed. + * This is a comma-delimited format with the system line separator character as the record separator.Values are + * double quoted when needed and special characters are escaped with {@code '"'}. The default NULL string is + * {@code ""}. Values are trimmed. * * * @@ -405,7 +406,7 @@ public final class CSVFormat implements Serializable { * * * @see Predefined#Oracle - * @see https://docs.oracle.com/database/121/SUTIL/GUID-D1762699-8154-40F6-90DE-EFB8EB6A9AB0.htm#SUTIL4217;>https://docs.oracle.com/database/121/SUTIL/GUID-D1762699-8154-40F6-90DE-EFB8EB6A9AB0.htm#SUTIL4217 + * @see https://s.apache.org/CGXG;>Oracle CSV Format Specification * @since 1.6 */ // @formatter:off @@ -442,8 +443,8 @@ public final class CSVFormat implements Serializable { * * * @see Predefined#MySQL - * @see https://www.postgresql.org/docs/current/static/sql-copy.html;> https://www.postgresql.org/docs/current/static/sql-copy.html - * -data.html + * @see https://www.postgresql.org/docs/current/static/sql-copy.html;>PostgreSQL COPY command + * documentation * @since 1.5 */ // @formatter:off @@ -479,7 +480,8 @@ public final class CSVFormat implements Serializable { * * * @see Predefined#MySQL - * @see https://www.postgresql.org/docs/current/static/sql-copy.html;> https://www.postgresql.org/docs/current/static/sql-copy.html + * @see https://www.postgresql.org/docs/current/static/sql-copy.html;>PostgreSQL COPY command + * documentation * @since 1.5 */ // @formatter:off
[03/48] commons-csv git commit: Add version 1.6 to changes.
Add version 1.6 to changes. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/10977ae1 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/10977ae1 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/10977ae1 Branch: refs/heads/release Commit: 10977ae1b2e50d3b347d9fe501c4e40a7dccd94e Parents: edb87f3 Author: Gary Gregory Authored: Mon Oct 9 13:10:23 2017 -0600 Committer: Gary Gregory Committed: Mon Oct 9 13:10:23 2017 -0600 -- src/changes/changes.xml | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/10977ae1/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 039d15f..bbfa930 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -38,6 +38,8 @@ Release Notes + + withNullString value is printed without quotes when QuoteMode.ALL is specified; add QuoteMode.ALL_NON_NULL. PR #17. Fix outdated comments about FileReader in CSVParser #13
[14/48] commons-csv git commit: Fix Javadocs typos
Fix Javadocs typos Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/0051a83d Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/0051a83d Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/0051a83d Branch: refs/heads/release Commit: 0051a83dcdceb818562fd30d7f195b91a549985f Parents: 1521cc2 Author: Bruno P. Kinoshita Authored: Sun Oct 22 00:13:22 2017 +1300 Committer: Bruno P. Kinoshita Committed: Sun Oct 22 00:13:22 2017 +1300 -- src/main/java/org/apache/commons/csv/CSVFormat.java | 4 ++-- src/main/java/org/apache/commons/csv/Lexer.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/0051a83d/src/main/java/org/apache/commons/csv/CSVFormat.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index 00f1064..58948fd 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -1859,7 +1859,7 @@ public final class CSVFormat implements Serializable { * @param recordSeparator *the record separator to use for output. * - * @return A new CSVFormat that is equal to this but with the the specified output record separator + * @return A new CSVFormat that is equal to this but with the specified output record separator */ public CSVFormat withRecordSeparator(final char recordSeparator) { return withRecordSeparator(String.valueOf(recordSeparator)); @@ -1876,7 +1876,7 @@ public final class CSVFormat implements Serializable { * @param recordSeparator *the record separator to use for output. * - * @return A new CSVFormat that is equal to this but with the the specified output record separator + * @return A new CSVFormat that is equal to this but with the specified output record separator * @throws IllegalArgumentException * if recordSeparator is none of CR, LF or CRLF */ http://git-wip-us.apache.org/repos/asf/commons-csv/blob/0051a83d/src/main/java/org/apache/commons/csv/Lexer.java -- diff --git a/src/main/java/org/apache/commons/csv/Lexer.java b/src/main/java/org/apache/commons/csv/Lexer.java index 8106532..76fa81e 100644 --- a/src/main/java/org/apache/commons/csv/Lexer.java +++ b/src/main/java/org/apache/commons/csv/Lexer.java @@ -326,7 +326,7 @@ final class Lexer implements Closeable { * @return the unescaped character (as an int) or {@link Constants#END_OF_STREAM} if char following the escape is * invalid. * @throws IOException if there is a problem reading the stream or the end of stream is detected: - * the escape character is not allowed at end of strem + * the escape character is not allowed at end of stream */ int readEscape() throws IOException { // the escape char has just been read (normally a backslash)
[07/48] commons-csv git commit: Next version will be 1.6 due to new auto-flush feature just added.
Next version will be 1.6 due to new auto-flush feature just added. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/5ca0f91f Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/5ca0f91f Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/5ca0f91f Branch: refs/heads/release Commit: 5ca0f91ff65440476239d67dd31da9556da1bd88 Parents: 3c0a73b Author: Gary Gregory Authored: Mon Oct 9 13:25:13 2017 -0600 Committer: Gary Gregory Committed: Mon Oct 9 13:25:13 2017 -0600 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/5ca0f91f/pom.xml -- diff --git a/pom.xml b/pom.xml index 0feb5be..a9777da 100644 --- a/pom.xml +++ b/pom.xml @@ -134,7 +134,7 @@ CSV files of various types. -1.5 +1.6 (Java 7+) RC1
[48/48] commons-csv git commit: Update website for commons-csv 1.6 release
Update website for commons-csv 1.6 release Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/2596582d Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/2596582d Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/2596582d Branch: refs/heads/release Commit: 2596582d61083f0d6ea9e3de63307d005f9aab2d Parents: 6c87f1f Author: Benedikt Ritter Authored: Wed Sep 19 11:03:14 2018 +0200 Committer: Benedikt Ritter Committed: Wed Sep 19 11:03:14 2018 +0200 -- src/site/site.xml | 2 ++ src/site/xdoc/index.xml | 6 -- 2 files changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/2596582d/src/site/site.xml -- diff --git a/src/site/site.xml b/src/site/site.xml index 25165bc..ad46165 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -40,6 +40,7 @@ + @@ -49,6 +50,7 @@ + http://git-wip-us.apache.org/repos/asf/commons-csv/blob/2596582d/src/site/xdoc/index.xml -- diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml index 04dabfb..8d8b248 100644 --- a/src/site/xdoc/index.xml +++ b/src/site/xdoc/index.xml @@ -51,6 +51,7 @@ The Javadoc API documents are available online: Javadoc trunk + Javadoc 1.6 Javadoc 1.5 Javadoc 1.4 Javadoc 1.3 @@ -66,7 +67,8 @@ The git repository can be - http://commons.apache.org/csv/download_csv.cgi;>Apache Commons CSV 1.5 (mirrors) requires Java 1.7 + http://commons.apache.org/csv/download_csv.cgi;>Apache Commons CSV 1.6 (mirrors) requires Java 1.7 + http://archive.apache.org/dist/commons/csv/;>Apache Commons CSV 1.5 (archives) requires Java 1.7 http://archive.apache.org/dist/commons/csv/;>Apache Commons CSV 1.4 (archives) requires Java 1.6 http://archive.apache.org/dist/commons/csv/;>Apache Commons CSV 1.3 (archives) requires Java 1.6 http://archive.apache.org/dist/commons/csv/;>Apache Commons CSV 1.2 (archives) requires Java 1.6 @@ -89,7 +91,7 @@ For previous releases, see the http://archive.apache.org/dist/commons/c dependency groupIdorg.apache.commons/groupId artifactIdcommons-csv/artifactId -version1.5/version +version1.6/version /dependency
[31/48] commons-csv git commit: [CSV-225] Parse method should avoid creating a redundant BufferedReader.
[CSV-225] Parse method should avoid creating a redundant BufferedReader. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/f5a1968b Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/f5a1968b Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/f5a1968b Branch: refs/heads/release Commit: f5a1968bb128db9a6a13ad0731f00237800163b2 Parents: 865872e Author: Gary Gregory Authored: Sat May 19 09:03:56 2018 -0600 Committer: Gary Gregory Committed: Sat May 19 09:03:56 2018 -0600 -- src/changes/changes.xml | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/f5a1968b/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index d94ccdd..21229a3 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -46,6 +46,7 @@ Inconsistency between Javadoc of CSVFormat DEFAULT EXCEL. Create CSVFormat.ORACLE preset. Some Multi Iterator Parsing Peek Sequences Incorrectly Consume Elements. + Parse method should avoid creating a redundant BufferedReader. withNullString value is printed without quotes when QuoteMode.ALL is specified; add QuoteMode.ALL_NON_NULL. PR #17.
[17/48] commons-csv git commit: [CSV-219] The behavior of quote char using is not similar as Excel does when the first string contains CJK char(s). [CSV-172] Don't quote cells just because they have U
[CSV-219] The behavior of quote char using is not similar as Excel does when the first string contains CJK char(s). [CSV-172] Don't quote cells just because they have UTF-8 encoded characters. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/8b3de71f Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/8b3de71f Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/8b3de71f Branch: refs/heads/release Commit: 8b3de71fd99d0fa07cb6a3a35b583bbb170aab66 Parents: e76c4d8 Author: Gary Gregory Authored: Mon Dec 11 11:16:01 2017 -0700 Committer: Gary Gregory Committed: Mon Dec 11 11:16:01 2017 -0700 -- src/changes/changes.xml| 2 ++ src/main/java/org/apache/commons/csv/CSVFormat.java| 5 + .../java/org/apache/commons/csv/CSVPrinterTest.java| 13 +++-- 3 files changed, 14 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/8b3de71f/src/changes/changes.xml -- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index b56b75f..302632e 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -40,6 +40,8 @@ Add autoFlush option for CsvPrinter. PR #24. + The behavior of quote char using is not similar as Excel does when the first string contains CJK char(s). + Don't quote cells just because they have UTF-8 encoded characters. withNullString value is printed without quotes when QuoteMode.ALL is specified; add QuoteMode.ALL_NON_NULL. PR #17. http://git-wip-us.apache.org/repos/asf/commons-csv/blob/8b3de71f/src/main/java/org/apache/commons/csv/CSVFormat.java -- diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index 58948fd..dc7588b 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -1186,10 +1186,7 @@ public final class CSVFormat implements Serializable { } else { char c = value.charAt(pos); -// RFC4180 (https://tools.ietf.org/html/rfc4180) TEXTDATA = %x20-21 / %x23-2B / %x2D-7E -if (newRecord && (c < 0x20 || c > 0x21 && c < 0x23 || c > 0x2B && c < 0x2D || c > 0x7E)) { -quote = true; -} else if (c <= COMMENT) { +if (c <= COMMENT) { // Some other chars at the start of a value caused the parser to fail, so for now // encapsulate if we start in anything less than '#'. We are being conservative // by including the default comment char too. http://git-wip-us.apache.org/repos/asf/commons-csv/blob/8b3de71f/src/test/java/org/apache/commons/csv/CSVPrinterTest.java -- diff --git a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java index ae7aae2..5a09627 100644 --- a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java +++ b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java @@ -1033,11 +1033,20 @@ public class CSVPrinterTest { } @Test -public void testRfc4180QuoteSingleChar() throws IOException { +public void testDontQuoteEuroFirstChar() throws IOException { final StringWriter sw = new StringWriter(); try (final CSVPrinter printer = new CSVPrinter(sw, CSVFormat.RFC4180)) { printer.printRecord(EURO_CH, "Deux"); -assertEquals("\"" + EURO_CH + "\",Deux" + recordSeparator, sw.toString()); +assertEquals(EURO_CH + ",Deux" + recordSeparator, sw.toString()); +} +} + +@Test +public void testQuoteCommaFirstChar() throws IOException { +final StringWriter sw = new StringWriter(); +try (final CSVPrinter printer = new CSVPrinter(sw, CSVFormat.RFC4180)) { +printer.printRecord(","); +assertEquals("\",\"" + recordSeparator, sw.toString()); } }
[10/48] commons-csv git commit: findbugs-maven-plugin 3.0.4 -> 3.0.5.
findbugs-maven-plugin 3.0.4 -> 3.0.5. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/27cdc557 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/27cdc557 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/27cdc557 Branch: refs/heads/release Commit: 27cdc557283ee23e32384fcafcd9f2dcab416378 Parents: 0c216e7 Author: Gary Gregory Authored: Mon Oct 9 13:56:34 2017 -0600 Committer: Gary Gregory Committed: Mon Oct 9 13:56:34 2017 -0600 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/27cdc557/pom.xml -- diff --git a/pom.xml b/pom.xml index 266b509..8011872 100644 --- a/pom.xml +++ b/pom.xml @@ -271,7 +271,7 @@ CSV files of various types. org.codehaus.mojo findbugs-maven-plugin -3.0.4 +3.0.5 org.codehaus.mojo
[47/48] commons-csv git commit: Fix link to release archive
Fix link to release archive Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/6c87f1fe Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/6c87f1fe Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/6c87f1fe Branch: refs/heads/release Commit: 6c87f1fe41d93057dbccbf074f855b56dc737950 Parents: 79adf78 Author: Benedikt Ritter Authored: Wed Sep 19 10:59:14 2018 +0200 Committer: Benedikt Ritter Committed: Wed Sep 19 10:59:14 2018 +0200 -- src/site/xdoc/index.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/6c87f1fe/src/site/xdoc/index.xml -- diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml index 40df179..04dabfb 100644 --- a/src/site/xdoc/index.xml +++ b/src/site/xdoc/index.xml @@ -67,7 +67,7 @@ The git repository can be http://commons.apache.org/csv/download_csv.cgi;>Apache Commons CSV 1.5 (mirrors) requires Java 1.7 - http://commons.apache.org/dist/commons/csv/;>Apache Commons CSV 1.4 (archives) requires Java 1.6 + http://archive.apache.org/dist/commons/csv/;>Apache Commons CSV 1.4 (archives) requires Java 1.6 http://archive.apache.org/dist/commons/csv/;>Apache Commons CSV 1.3 (archives) requires Java 1.6 http://archive.apache.org/dist/commons/csv/;>Apache Commons CSV 1.2 (archives) requires Java 1.6 http://archive.apache.org/dist/commons/csv/;>Apache Commons CSV 1.1 (archives) requires Java 1.6
[01/48] commons-csv git commit: Bump to next development version
Repository: commons-csv Updated Branches: refs/heads/release f76a13570 -> 2596582d6 Bump to next development version Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/3e3c2365 Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/3e3c2365 Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/3e3c2365 Branch: refs/heads/release Commit: 3e3c236562ed3c520f70bb0cfeec9c8587fd9481 Parents: f76a135 Author: Bruno P. Kinoshita Authored: Sun Sep 3 17:26:46 2017 +1200 Committer: Bruno P. Kinoshita Committed: Sun Sep 3 17:26:46 2017 +1200 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/3e3c2365/pom.xml -- diff --git a/pom.xml b/pom.xml index 232a5de..262bc17 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ 42 commons-csv - 1.5 + 1.5.1-SNAPSHOT Apache Commons CSV http://commons.apache.org/proper/commons-csv/
[22/48] commons-csv git commit: Slightly better Javadoc.
Slightly better Javadoc. Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/eede739d Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/eede739d Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/eede739d Branch: refs/heads/release Commit: eede739d18c69722ff39e8e42df6b68ae7627082 Parents: f3f48be Author: Gary Gregory Authored: Tue Jan 9 10:31:48 2018 -0700 Committer: Gary Gregory Committed: Tue Jan 9 10:31:48 2018 -0700 -- src/main/java/org/apache/commons/csv/QuoteMode.java | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/commons-csv/blob/eede739d/src/main/java/org/apache/commons/csv/QuoteMode.java -- diff --git a/src/main/java/org/apache/commons/csv/QuoteMode.java b/src/main/java/org/apache/commons/csv/QuoteMode.java index 216f775..272deb7 100644 --- a/src/main/java/org/apache/commons/csv/QuoteMode.java +++ b/src/main/java/org/apache/commons/csv/QuoteMode.java @@ -17,8 +17,7 @@ package org.apache.commons.csv; /** - * Defines quote behavior when printing. - * + * Defines quoting behavior when printing. */ public enum QuoteMode { @@ -33,8 +32,8 @@ public enum QuoteMode { ALL_NON_NULL, /** - * Quotes fields which contain special characters such as a delimiter, quotes character or any of the characters in - * line separator. + * Quotes fields which contain special characters such as a the field delimiter, quote character or any of the + * characters in the line separator string. */ MINIMAL, @@ -44,8 +43,8 @@ public enum QuoteMode { NON_NUMERIC, /** - * Never quotes fields. When the delimiter occurs in data, the printer prefixes it with the current escape - * character. If the escape character is not set, format validation throws an exception. + * Never quotes fields. When the delimiter occurs in data, the printer prefixes it with the escape character. If the + * escape character is not set, format validation throws an exception. */ NONE }
svn commit: r1841298 - /commons/proper/commons-parent/trunk/pom.xml
Author: britter Date: Wed Sep 19 08:13:47 2018 New Revision: 1841298 URL: http://svn.apache.org/viewvc?rev=1841298=rev Log: Remove redundant information that is already in changes.xml Modified: commons/proper/commons-parent/trunk/pom.xml Modified: commons/proper/commons-parent/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/commons-parent/trunk/pom.xml?rev=1841298=1841297=1841298=diff == --- commons/proper/commons-parent/trunk/pom.xml (original) +++ commons/proper/commons-parent/trunk/pom.xml Wed Sep 19 08:13:47 2018 @@ -37,169 +37,6 @@ http://issues.apache.org/jira/browse/COMMONSSITE - - - - - - - - - - - - - - 3.0.5
svn commit: r1841297 - /commons/proper/commons-parent/trunk/src/changes/changes.xml
Author: britter Date: Wed Sep 19 08:11:41 2018 New Revision: 1841297 URL: http://svn.apache.org/viewvc?rev=1841297=rev Log: Format changes.xml Modified: commons/proper/commons-parent/trunk/src/changes/changes.xml Modified: commons/proper/commons-parent/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/commons-parent/trunk/src/changes/changes.xml?rev=1841297=1841296=1841297=diff == --- commons/proper/commons-parent/trunk/src/changes/changes.xml (original) +++ commons/proper/commons-parent/trunk/src/changes/changes.xml Wed Sep 19 08:11:41 2018 @@ -38,7 +38,8 @@ and commit The type attribute can be add,update,fix,remove. --> -http://maven.apache.org/changes/1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/xsd/changes-1.0.0.xsd;> +http://maven.apache.org/changes/1.0.0; +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/xsd/changes-1.0.0.xsd;> Changes Apache Commons developers @@ -111,7 +112,7 @@ The type attribute can be add,u - Rearranging plugin order in -Prelease, removing commons-release-plugin from build>pluginManagement +Rearranging plugin order in -Prelease, removing commons-release-plugin from build>pluginManagement COMMONSSITE-89 - support both clirr and japicmp Clirr report must now be explicitly enabled using src/site/resources/profile.clirr file or -Pclirr option @@ -318,7 +319,7 @@ The main changes in this release are: - updated some plugins "> - + commons-skin 3 -> 4 maven-deploy-plugin2.7 -> 2.8.1 maven-jxr-plugin 2.3 -> 2.4 @@ -330,13 +331,13 @@ The main changes in this release are: apache-rat-plugin 0.9 -> 0.10 clirr-maven-plugin 2.5 -> 2.6.1 cobertura-maven-plugin 2.5.2 -> 2.6 - + jacoco-maven-plugin 0.6.3.201306030806 -> 0.6.4.201312101107 Fixed JaCoCo configuration - syntax changed completely between 0.6.2.x and 0.6.3.x Add commons.compiler.version property so compiler plugin version can be overridden if necessary Add source archive to Maven artifacts - + Add Javadoc link to Java EE. - +
svn commit: r1841296 - in /commons/proper/commons-parent/trunk: pom.xml src/changes/changes.xml
Author: britter Date: Wed Sep 19 08:06:17 2018 New Revision: 1841296 URL: http://svn.apache.org/viewvc?rev=1841296=rev Log: COMMONSSITE-124: Revert change in commons.scmPubUrl in Parent 47 Modified: commons/proper/commons-parent/trunk/pom.xml commons/proper/commons-parent/trunk/src/changes/changes.xml Modified: commons/proper/commons-parent/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/commons-parent/trunk/pom.xml?rev=1841296=1841295=1841296=diff == --- commons/proper/commons-parent/trunk/pom.xml (original) +++ commons/proper/commons-parent/trunk/pom.xml Wed Sep 19 08:06:17 2018 @@ -1940,7 +1940,7 @@ ${commons.componentid} - https://svn.apache.org/repos/infra/websites/production/commons/content/proper/${commons.componentid} + https://svn.apache.org/repos/infra/websites/production/commons/content/proper/${project.artifactId} ${commons.site.cache}/${commons.site.path} commons.site Modified: commons/proper/commons-parent/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/commons-parent/trunk/src/changes/changes.xml?rev=1841296=1841295=1841296=diff == --- commons/proper/commons-parent/trunk/src/changes/changes.xml (original) +++ commons/proper/commons-parent/trunk/src/changes/changes.xml Wed Sep 19 08:06:17 2018 @@ -61,6 +61,7 @@ The type attribute can be add,u +Revert change in commons.scmPubUrl in Parent 47 Update parent from org.apache:apache 19 to 20. maven-compiler-plugin 3.7.0 -> 3.8.0 re-enabled japicmp and introduced japicmp.skip property that