This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-csv.git


The following commit(s) were added to refs/heads/master by this push:
     new c683594  CSV-242 CSVFormat equals() and hashCode() don't use all fields
c683594 is described below

commit c683594f59030e5515b95ff7d8d0b9fa66eaac42
Author: Sebb <s...@apache.org>
AuthorDate: Fri Jun 14 17:21:33 2019 +0100

    CSV-242 CSVFormat equals() and hashCode() don't use all fields
    
    Fix hashCode()
---
 src/changes/changes.xml                            | 363 +++++++++++----------
 .../java/org/apache/commons/csv/CSVFormat.java     |   6 +
 .../java/org/apache/commons/csv/CSVFormatTest.java |   5 +-
 3 files changed, 192 insertions(+), 182 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 6fa07c8..38acf73 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -1,181 +1,182 @@
-<?xml version="1.0"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements. See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License. You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<!--
-  This file is used by the maven-changes-plugin to generate the release notes.
-  Useful ways of finding items to add to this file are:
-
-  1. Add items when you fix a bug or add a feature (this makes the
-  release process easy :-).
-
-  2. Do a JIRA search for tickets closed since the previous release.
-
-  3. Use the report generated by the maven-changelog-plugin to see all
-  SVN commits. Set the project.properties' maven.changelog.range
-  property to the number of days since the last release.
-
-
-  The <action> type attribute can be add,update,fix,remove.
--->
-
-<document>
-  <properties>
-    <title>Apache Commons CSV Release Notes</title>
-  </properties>
-  <body>
-    <release version="1.8" date="2019-MM-DD" description="Feature and bug fix 
release (Java 8)">
-      <action issue="CSV-241" type="fix" dev="ggregory" due-to="LuckyIlam, 
Gary Gregory">CSVFormat#valiadte() does not account for 
allowDuplicateHeaderNames #43.</action>
-    </release>
-    <release version="1.7" date="2019-06-01" description="Feature and bug fix 
release (Java 8)">
-      <action issue="CSV-233" type="add" dev="ggregory" due-to="Gary 
Gregory">Add predefined CSVFormats for printing MongoDB CSV and TSV.</action>
-      <action issue="CSV-208" type="fix" dev="ggregory" due-to="Jurrie 
Overgoor">Fix escape character for POSTGRESQL_TEXT and POSTGRESQL_CSV 
formats.</action>
-      <action issue="CSV-232" type="fix" dev="ggregory" due-to="Jurrie 
Overgoor, Gary Gregory">Site link "Source Repository" does not work.</action>
-      <action issue="CSV-234" type="add" dev="ggregory" due-to="Roberto 
Benedetti, Gary Gregory">Add support for java.sql.Clob.</action>
-      <action issue="CSV-237" type="update" dev="ggregory" due-to="Gary 
Gregory">Update to Java 8.</action>
-      <action issue="CSV-238" type="fix" dev="ggregory" due-to="Stephen 
Olander-Waters">Escape quotes in CLOBs #39.</action>
-      <action issue="CSV-239" type="add" dev="ggregory" due-to="Gary Gregory, 
Dave Moten">Cannot get headers in column order from CSVRecord.</action>
-      <action                 type="update" dev="ggregory" due-to="Gary 
Gregory">Update tests from H2 1.4.198 to 1.4.199.</action>
-    </release>
-    <release version="1.6" date="2018-09-22" description="Feature and bug fix 
release (Java 7)">
-      <action issue="CSV-231" type="update" dev="britter">Add more 
documentation to CSVPrinter.</action>
-      <action issue="CSV-217" type="add" dev="ggregory" due-to="Korolyov 
Alexei">Add autoFlush option for CsvPrinter. PR #24.</action>
-      <action issue="CSV-219" type="fix" dev="ggregory" due-to="Zhang 
Hongda">The behavior of quote char using is not similar as Excel does when the 
first string contains CJK char(s).</action>
-      <action issue="CSV-172" type="fix" dev="ggregory" due-to="Andrew 
Pennebaker">Don't quote cells just because they have UTF-8 encoded 
characters.</action>
-      <action issue="CSV-220" type="add" dev="ggregory" due-to="Gary 
Gregory">Add API 
org.apache.commons.csv.CSVFormat.withSystemRecordSeparator().</action>
-      <action issue="CSV-223" type="fix" dev="ggregory" due-to="Samuel 
Martin">Inconsistency between Javadoc of CSVFormat DEFAULT EXCEL.</action>
-      <action issue="CSV-209" type="fix" dev="ggregory" due-to="Gary 
Gregory">Create CSVFormat.ORACLE preset.</action>
-      <action issue="CSV-224" type="fix" dev="ggregory" due-to="David 
Warshaw">Some multi-iterator parsing peek sequences incorrectly consume 
elements.</action>
-      <action issue="CSV-225" type="fix" dev="ggregory" due-to="Anson 
Schwabecher">Parse method should avoid creating a redundant 
BufferedReader.</action>
-      <action issue="CSV-233" type="fix" dev="ggregory" due-to="Gary 
Gregory">Add predefined CSVFormats for printing MongoDB CSV and TSV.</action>
-    </release>
-    <release version="1.5" date="2017-09-03" description="Feature and bug fix 
release (Java 7)">
-      <action issue="CSV-203" type="fix" dev="ggregory" due-to="Richard 
Wheeldon, Kai Paroth">withNullString value is printed without quotes when 
QuoteMode.ALL is specified; add QuoteMode.ALL_NON_NULL. PR #17.</action>
-      <action issue="CSV-194" type="fix" dev="ggregory" due-to="Marc 
Prud'hommeaux">Fix outdated comments about FileReader in CSVParser #13</action>
-      <action issue="CSV-193" type="fix" dev="ggregory" due-to="Matthias 
Wiehl">Fix incorrect method name 'withFirstRowAsHeader' in user guide.</action>
-      <action issue="CSV-171" type="fix" dev="ggregory" due-to="Gary Gregory, 
Michael Graessle, Adrian Bridgett">Negative numeric values in the first column 
are always quoted in minimal mode.</action>
-      <action issue="CSV-187" type="update" dev="ggregory" due-to="Gary 
Gregory">Update platform requirement from Java 6 to 7.</action>
-      <action issue="CSV-201" type="update" dev="ggregory" due-to="Benedikt 
Ritter, Gary Gregory">Do not use RuntimeException in CSVParser.iterator().new 
Iterator() {...}.getNextRecord()</action>
-      <action issue="CSV-189" type="add" dev="ggregory" due-to="Peter 
Holzwarth, Gary Gregory">CSVParser: Add factory method accepting 
InputStream.</action>
-      <action issue="CSV-190" type="add" dev="ggregory" due-to="Gary 
Gregory">Add convenience API CSVFormat.print(File, Charset)</action>
-      <action issue="CSV-191" type="add" dev="ggregory" due-to="Gary 
Gregory">Add convenience API CSVFormat.print(Path, Charset)</action>
-      <action issue="CSV-192" type="add" dev="ggregory" due-to="Gary 
Gregory">Add convenience API CSVParser.parse(Path, Charset, CSVFormat)</action>
-      <action issue="CSV-205" type="add" dev="ggregory" due-to="Gary 
Gregory">Add convenience API CSVFormat#printer() to print to System.out</action>
-      <action issue="CSV-207" type="add" dev="ggregory" due-to="Gary 
Gregory">Provide a CSV Format for printing PostgreSQL CSV and Text 
formats.</action>
-      <action issue="CSV-214" type="add" dev="ggregory" due-to="Nitin 
Mahendru, Gary Gregory">Adding a placeholder in the Lexer and CSV parser to 
store the end-of-line string.</action>
-    </release>
-    <release version="1.4" date="2016-05-28" description="Feature and bug fix 
release (Java 6)">
-      <action issue="CSV-181" type="update" dev="ggregory" due-to="Gary 
Gregory">Make CSVPrinter.print(Object) GC-free.</action>
-      <action issue="CSV-182" type="add" dev="ggregory" due-to="Gary 
Gregory">Allow some printing operations directly from CSVFormat.</action>
-      <action issue="CSV-183" type="update" dev="ggregory">Drop ferc.gov 
tests.</action>
-    </release>
-    <release version="1.3" date="2016-05-09" description="Feature and bug fix 
release (Java 6)">
-      <action issue="CSV-179" type="add" dev="britter">Add shortcut method for 
using first record as header to CSVFormat</action>
-      <action issue="CSV-180" type="add" dev="britter">Add 
withHeader(Class&lt;? extends Enum&gt;) to CSVFormat</action>
-      <action issue="CSV-167" type="update" dev="sebb" due-to="Rene">Comment 
line hides next record; update Javadoc to make behavior clear</action>
-      <action issue="CSV-153" type="update" dev="britter" 
due-to="Wren">CSVPrinter doesn't skip creation of header record if 
skipHeaderRecord is set to true</action>
-      <action issue="CSV-159" type="add" dev="ggregory" due-to="Yamil 
Medina">Add IgnoreCase option for accessing header names</action>
-      <action issue="CSV-169" type="add" dev="ggregory" due-to="Gary 
Gregory">The null string should be case-sensitive when reading records</action>
-      <action issue="CSV-168" type="fix" dev="ggregory" due-to="Gary Gregory, 
cornel creanga">CSVFormat.nullString should not be escaped</action>
-      <action issue="CSV-170" type="fix" dev="ggregory" due-to="Gary Gregory, 
cornel creanga">CSVFormat.MYSQL nullString should be "\N"</action>
-      <action issue="CSV-161" type="fix" dev="ggregory" due-to="Gary Gregory, 
Kristof Meixner, Emmanuel Bourg">Fix Javadoc to say CSVFormat with() methods 
return a new CSVFormat</action>
-      <action issue="CSV-175" type="add" dev="ggregory" due-to="Gary Gregory, 
Chris Jones">Support for ignoring trailing delimiter.</action>
-      <action issue="CSV-177" type="add" dev="ggregory" due-to="Gary 
Gregory">Support trimming leading and trailing blanks.</action>
-      <action issue="CSV-178" type="add" dev="ggregory" due-to="Gary 
Gregory">Create default formats for Informix UNLOAD and UNLOAD CSV.</action>
-    </release>
-    <release version="1.2" date="2015-08-24" description="Feature and bug fix 
release (Java 6)">
-      <action issue="CSV-145" type="fix" dev="ggregory" due-to="Frank 
Ulbricht">CSVFormat.with* methods clear the header comments</action>
-      <action issue="CSV-156" type="fix" dev="ggregory" due-to="Jason 
Steenstra-Pickens">Incorrect Javadoc on QuoteMode.NONE</action>
-      <action issue="CSV-157" type="add" dev="ggregory">Add enum 
CSVFormat.Predefined that contains the default CSVFormat values.</action>
-    </release>
-    <release version="1.1" date="2014-11-16" description="Feature and bug fix 
release (Java 6)">
-      <action issue="CSV-140" type="fix" dev="ggregory" due-to="Damjan 
Jovanovic">QuoteMode.NON_NUMERIC doesn't work with 
CSVPrinter.printRecords(ResultSet)</action>
-      <action issue="CSV-130" type="fix" dev="ggregory" due-to="Sergei 
Lebedev">CSVFormat#withHeader doesn't work well with #printComment, add 
withHeaderComments(String...)</action>
-      <action issue="CSV-128" type="fix" dev="ggregory">CSVFormat.EXCEL should 
ignore empty header names</action>
-      <action issue="CSV-132" type="fix" dev="ggregory" due-to="Sascha 
Szott">Incorrect Javadoc referencing org.apache.commons.csv.CSVFormat 
withQuote()</action>
-      <action issue="CSV-124" type="update" dev="brentworden" 
due-to="Kalyan">Improve toString() implementation of CSVRecord</action>
-      <action issue="CSV-134" type="update" dev="ggregory" due-to="wu 
wen">Unified parameter validation</action>
-      <action issue="CSV-129" type="add" dev="ggregory">Add CSVFormat#with 
0-arg methods matching boolean arg methods</action>
-      <action issue="CSV-131" type="add" dev="ggregory" due-to="Holger 
Stratmann">Save positions of records to enable random access</action>
-      <action issue="CSV-139" type="add" 
dev="ggregory">CSVPrinter.printRecord(ResultSet) with metadata</action>
-    </release>
-    <release version="1.0" date="2014-08-14" description="First release (Java 
6)">
-      <action issue="CSV-125" type="fix" dev="britter">No longer works with 
Java 6</action>
-      <action issue="CSV-122" type="fix" dev="britter" due-to="Mike 
Lewis">NullPointerException when empty header string and and null string of 
""</action>
-      <action issue="CSV-117" type="update" dev="sebb">Validate format 
parameters in constructor</action>
-      <action issue="CSV-121" type="add" dev="ggregory" due-to="Sebastian 
Hardt">IllegalArgumentException thrown when the header contains duplicate names 
when the column names are empty.</action>
-      <action issue="CSV-120" type="add" dev="ggregory" due-to="Sergei 
Lebedev">CSVFormat#withHeader doesn't work with CSVPrinter</action>
-      <action issue="CSV-119" type="add" dev="ggregory" due-to="Sergei 
Lebedev">CSVFormat is missing a print(...) method</action>
-      <action issue="CSV-118" type="fix" dev="ggregory" due-to="Enrique 
Lara">CSVRecord.toMap() throws NPE on formats with no
-        headers.</action>
-      <action issue="CSV-113" type="fix" dev="sebb">Check whether ISE/IAE are 
being used appropriately</action>
-      <action issue="CSV-114" type="fix" dev="sebb">CSVFormat constructor 
should reject a header array with duplicate
-        entries
-      </action>
-      <action issue="CSV-112" type="fix" dev="britter">HeaderMap is 
inconsistent when it is parsed from an input with
-        duplicate columns names
-      </action>
-      <action issue="CSV-111" type="fix" dev="ggregory">CSVRecord.toMap() 
fails if row length shorter than header length
-      </action>
-      <action issue="CSV-106" type="fix" dev="ggregory">CSVFormat.format 
allways append null</action>
-      <action issue="CSV-105" type="add" dev="ggregory">Add Map conversion API 
to CSVRecord</action>
-      <action issue="CSV-100" type="fix" dev="ggregory">CSVParser: 
getHeaderMap throws NPE</action>
-      <action issue="CSV-42" type="update" dev="ebourg" due-to="Bob 
Smith">Lots of possible changes</action>
-      <action issue="CSV-78" type="update" dev="sebb">Use Character instead of 
char for char fields except delimiter
-      </action>
-      <action issue="CSV-99" type="update" dev="britter">Revert Builder 
implementation in CSVFormat</action>
-      <action issue="CSV-53" type="fix" dev="britter">CSVRecord does not 
verify that the length of the header mapping
-        matches the number of values
-      </action>
-      <action issue="CSV-93" type="update" dev="ggregory">Allow the handling 
of NULL values</action>
-      <action issue="CSV-68" type="update" dev="ggregory">Use the Builder 
pattern for CSVFormat</action>
-      <action issue="CSV-84" type="update" dev="sebb">Clarify comment 
handling</action>
-      <action issue="CSV-25" type="update" dev="ebourg">CSVParser.nextValue() 
seems pointless</action>
-      <action issue="CSV-97" type="update" dev="ggregory">Allow the String 
value for null to be customized for the CSV
-        printer
-      </action>
-      <action issue="CSV-88" type="update" dev="ggregory">Not possible to 
create a CSVFormat from scratch</action>
-      <action issue="CSV-52" type="add" dev="ggregory">Keep track of record 
number</action>
-      <action issue="CSV-94" type="update" dev="sebb">Lexer should only use 
char fields</action>
-      <action issue="CSV-92" type="add" dev="ggregory">Need a way to extract 
parsed headers, e.g. for use in formatting
-        output
-      </action>
-      <action issue="CSV-65" type="add" dev="ebourg">Header support</action>
-      <action issue="CSV-54" type="fix" dev="sebb">Confusing semantic of the 
ignore leading/trailing spaces parameters
-      </action>
-      <action issue="CSV-71" type="update" dev="sebb">Add convenience methods 
to CSVLexer</action>
-      <action issue="CSV-59" type="update" dev="ebourg">Is CharBuffer really 
needed, now that StringBuilder is available?
-      </action>
-      <action issue="CSV-55" type="update" dev="britter">Replace 
while(true)-loop in CSVParser.getRecord with do-while-loop
-      </action>
-      <action issue="CSV-34" type="fix" dev="sebb">CSVFormat describes itself 
as immutable, but it is not - in
-        particular it is not thread-safe
-      </action>
-      <action issue="CSV-36" type="fix" dev="yonik">Endless loops in CSV 
parser</action>
-      <action issue="CSV-13" type="fix" dev="ebourg">NullPointerException in 
CSVPrinter.print()/println()</action>
-      <action issue="CSV-45" type="update" dev="yonik">CSVPrinter 
overhaul</action>
-      <action issue="CSV-23" type="fix" dev="ebourg">Excel strategy uses wrong 
separator</action>
-      <action issue="CSV-49" type="update" dev="ebourg" due-to="Bob 
Smith">CSVStrategy has modifiable public static variables
-      </action>
-      <action issue="CSV-48" type="add" dev="ebourg">Predefined format for 
MYSQL</action>
-      <action issue="CSV-46" type="update" dev="ebourg">Reduce visibility of 
methods in internal classes</action>
-      <action issue="CSV-26" type="update" 
dev="jacopoc">ExtendedBufferedReader does too much</action>
-      <action issue="CSV-27" type="update" dev="ebourg">Decide whether to keep 
the csv.writer subpackage</action>
-    </release>
-
-  </body>
-</document>
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!--
+  This file is used by the maven-changes-plugin to generate the release notes.
+  Useful ways of finding items to add to this file are:
+
+  1. Add items when you fix a bug or add a feature (this makes the
+  release process easy :-).
+
+  2. Do a JIRA search for tickets closed since the previous release.
+
+  3. Use the report generated by the maven-changelog-plugin to see all
+  SVN commits. Set the project.properties' maven.changelog.range
+  property to the number of days since the last release.
+
+
+  The <action> type attribute can be add,update,fix,remove.
+-->
+
+<document>
+  <properties>
+    <title>Apache Commons CSV Release Notes</title>
+  </properties>
+  <body>
+    <release version="1.8" date="2019-MM-DD" description="Feature and bug fix 
release (Java 8)">
+      <action issue="CSV-242" type="fix" dev="sebb">CSVFormat equals() and 
hash() don't use all fields</action>
+      <action issue="CSV-241" type="fix" dev="ggregory" due-to="LuckyIlam, 
Gary Gregory">CSVFormat#valiadte() does not account for 
allowDuplicateHeaderNames #43.</action>
+    </release>
+    <release version="1.7" date="2019-06-01" description="Feature and bug fix 
release (Java 8)">
+      <action issue="CSV-233" type="add" dev="ggregory" due-to="Gary 
Gregory">Add predefined CSVFormats for printing MongoDB CSV and TSV.</action>
+      <action issue="CSV-208" type="fix" dev="ggregory" due-to="Jurrie 
Overgoor">Fix escape character for POSTGRESQL_TEXT and POSTGRESQL_CSV 
formats.</action>
+      <action issue="CSV-232" type="fix" dev="ggregory" due-to="Jurrie 
Overgoor, Gary Gregory">Site link "Source Repository" does not work.</action>
+      <action issue="CSV-234" type="add" dev="ggregory" due-to="Roberto 
Benedetti, Gary Gregory">Add support for java.sql.Clob.</action>
+      <action issue="CSV-237" type="update" dev="ggregory" due-to="Gary 
Gregory">Update to Java 8.</action>
+      <action issue="CSV-238" type="fix" dev="ggregory" due-to="Stephen 
Olander-Waters">Escape quotes in CLOBs #39.</action>
+      <action issue="CSV-239" type="add" dev="ggregory" due-to="Gary Gregory, 
Dave Moten">Cannot get headers in column order from CSVRecord.</action>
+      <action                 type="update" dev="ggregory" due-to="Gary 
Gregory">Update tests from H2 1.4.198 to 1.4.199.</action>
+    </release>
+    <release version="1.6" date="2018-09-22" description="Feature and bug fix 
release (Java 7)">
+      <action issue="CSV-231" type="update" dev="britter">Add more 
documentation to CSVPrinter.</action>
+      <action issue="CSV-217" type="add" dev="ggregory" due-to="Korolyov 
Alexei">Add autoFlush option for CsvPrinter. PR #24.</action>
+      <action issue="CSV-219" type="fix" dev="ggregory" due-to="Zhang 
Hongda">The behavior of quote char using is not similar as Excel does when the 
first string contains CJK char(s).</action>
+      <action issue="CSV-172" type="fix" dev="ggregory" due-to="Andrew 
Pennebaker">Don't quote cells just because they have UTF-8 encoded 
characters.</action>
+      <action issue="CSV-220" type="add" dev="ggregory" due-to="Gary 
Gregory">Add API 
org.apache.commons.csv.CSVFormat.withSystemRecordSeparator().</action>
+      <action issue="CSV-223" type="fix" dev="ggregory" due-to="Samuel 
Martin">Inconsistency between Javadoc of CSVFormat DEFAULT EXCEL.</action>
+      <action issue="CSV-209" type="fix" dev="ggregory" due-to="Gary 
Gregory">Create CSVFormat.ORACLE preset.</action>
+      <action issue="CSV-224" type="fix" dev="ggregory" due-to="David 
Warshaw">Some multi-iterator parsing peek sequences incorrectly consume 
elements.</action>
+      <action issue="CSV-225" type="fix" dev="ggregory" due-to="Anson 
Schwabecher">Parse method should avoid creating a redundant 
BufferedReader.</action>
+      <action issue="CSV-233" type="fix" dev="ggregory" due-to="Gary 
Gregory">Add predefined CSVFormats for printing MongoDB CSV and TSV.</action>
+    </release>
+    <release version="1.5" date="2017-09-03" description="Feature and bug fix 
release (Java 7)">
+      <action issue="CSV-203" type="fix" dev="ggregory" due-to="Richard 
Wheeldon, Kai Paroth">withNullString value is printed without quotes when 
QuoteMode.ALL is specified; add QuoteMode.ALL_NON_NULL. PR #17.</action>
+      <action issue="CSV-194" type="fix" dev="ggregory" due-to="Marc 
Prud'hommeaux">Fix outdated comments about FileReader in CSVParser #13</action>
+      <action issue="CSV-193" type="fix" dev="ggregory" due-to="Matthias 
Wiehl">Fix incorrect method name 'withFirstRowAsHeader' in user guide.</action>
+      <action issue="CSV-171" type="fix" dev="ggregory" due-to="Gary Gregory, 
Michael Graessle, Adrian Bridgett">Negative numeric values in the first column 
are always quoted in minimal mode.</action>
+      <action issue="CSV-187" type="update" dev="ggregory" due-to="Gary 
Gregory">Update platform requirement from Java 6 to 7.</action>
+      <action issue="CSV-201" type="update" dev="ggregory" due-to="Benedikt 
Ritter, Gary Gregory">Do not use RuntimeException in CSVParser.iterator().new 
Iterator() {...}.getNextRecord()</action>
+      <action issue="CSV-189" type="add" dev="ggregory" due-to="Peter 
Holzwarth, Gary Gregory">CSVParser: Add factory method accepting 
InputStream.</action>
+      <action issue="CSV-190" type="add" dev="ggregory" due-to="Gary 
Gregory">Add convenience API CSVFormat.print(File, Charset)</action>
+      <action issue="CSV-191" type="add" dev="ggregory" due-to="Gary 
Gregory">Add convenience API CSVFormat.print(Path, Charset)</action>
+      <action issue="CSV-192" type="add" dev="ggregory" due-to="Gary 
Gregory">Add convenience API CSVParser.parse(Path, Charset, CSVFormat)</action>
+      <action issue="CSV-205" type="add" dev="ggregory" due-to="Gary 
Gregory">Add convenience API CSVFormat#printer() to print to System.out</action>
+      <action issue="CSV-207" type="add" dev="ggregory" due-to="Gary 
Gregory">Provide a CSV Format for printing PostgreSQL CSV and Text 
formats.</action>
+      <action issue="CSV-214" type="add" dev="ggregory" due-to="Nitin 
Mahendru, Gary Gregory">Adding a placeholder in the Lexer and CSV parser to 
store the end-of-line string.</action>
+    </release>
+    <release version="1.4" date="2016-05-28" description="Feature and bug fix 
release (Java 6)">
+      <action issue="CSV-181" type="update" dev="ggregory" due-to="Gary 
Gregory">Make CSVPrinter.print(Object) GC-free.</action>
+      <action issue="CSV-182" type="add" dev="ggregory" due-to="Gary 
Gregory">Allow some printing operations directly from CSVFormat.</action>
+      <action issue="CSV-183" type="update" dev="ggregory">Drop ferc.gov 
tests.</action>
+    </release>
+    <release version="1.3" date="2016-05-09" description="Feature and bug fix 
release (Java 6)">
+      <action issue="CSV-179" type="add" dev="britter">Add shortcut method for 
using first record as header to CSVFormat</action>
+      <action issue="CSV-180" type="add" dev="britter">Add 
withHeader(Class&lt;? extends Enum&gt;) to CSVFormat</action>
+      <action issue="CSV-167" type="update" dev="sebb" due-to="Rene">Comment 
line hides next record; update Javadoc to make behavior clear</action>
+      <action issue="CSV-153" type="update" dev="britter" 
due-to="Wren">CSVPrinter doesn't skip creation of header record if 
skipHeaderRecord is set to true</action>
+      <action issue="CSV-159" type="add" dev="ggregory" due-to="Yamil 
Medina">Add IgnoreCase option for accessing header names</action>
+      <action issue="CSV-169" type="add" dev="ggregory" due-to="Gary 
Gregory">The null string should be case-sensitive when reading records</action>
+      <action issue="CSV-168" type="fix" dev="ggregory" due-to="Gary Gregory, 
cornel creanga">CSVFormat.nullString should not be escaped</action>
+      <action issue="CSV-170" type="fix" dev="ggregory" due-to="Gary Gregory, 
cornel creanga">CSVFormat.MYSQL nullString should be "\N"</action>
+      <action issue="CSV-161" type="fix" dev="ggregory" due-to="Gary Gregory, 
Kristof Meixner, Emmanuel Bourg">Fix Javadoc to say CSVFormat with() methods 
return a new CSVFormat</action>
+      <action issue="CSV-175" type="add" dev="ggregory" due-to="Gary Gregory, 
Chris Jones">Support for ignoring trailing delimiter.</action>
+      <action issue="CSV-177" type="add" dev="ggregory" due-to="Gary 
Gregory">Support trimming leading and trailing blanks.</action>
+      <action issue="CSV-178" type="add" dev="ggregory" due-to="Gary 
Gregory">Create default formats for Informix UNLOAD and UNLOAD CSV.</action>
+    </release>
+    <release version="1.2" date="2015-08-24" description="Feature and bug fix 
release (Java 6)">
+      <action issue="CSV-145" type="fix" dev="ggregory" due-to="Frank 
Ulbricht">CSVFormat.with* methods clear the header comments</action>
+      <action issue="CSV-156" type="fix" dev="ggregory" due-to="Jason 
Steenstra-Pickens">Incorrect Javadoc on QuoteMode.NONE</action>
+      <action issue="CSV-157" type="add" dev="ggregory">Add enum 
CSVFormat.Predefined that contains the default CSVFormat values.</action>
+    </release>
+    <release version="1.1" date="2014-11-16" description="Feature and bug fix 
release (Java 6)">
+      <action issue="CSV-140" type="fix" dev="ggregory" due-to="Damjan 
Jovanovic">QuoteMode.NON_NUMERIC doesn't work with 
CSVPrinter.printRecords(ResultSet)</action>
+      <action issue="CSV-130" type="fix" dev="ggregory" due-to="Sergei 
Lebedev">CSVFormat#withHeader doesn't work well with #printComment, add 
withHeaderComments(String...)</action>
+      <action issue="CSV-128" type="fix" dev="ggregory">CSVFormat.EXCEL should 
ignore empty header names</action>
+      <action issue="CSV-132" type="fix" dev="ggregory" due-to="Sascha 
Szott">Incorrect Javadoc referencing org.apache.commons.csv.CSVFormat 
withQuote()</action>
+      <action issue="CSV-124" type="update" dev="brentworden" 
due-to="Kalyan">Improve toString() implementation of CSVRecord</action>
+      <action issue="CSV-134" type="update" dev="ggregory" due-to="wu 
wen">Unified parameter validation</action>
+      <action issue="CSV-129" type="add" dev="ggregory">Add CSVFormat#with 
0-arg methods matching boolean arg methods</action>
+      <action issue="CSV-131" type="add" dev="ggregory" due-to="Holger 
Stratmann">Save positions of records to enable random access</action>
+      <action issue="CSV-139" type="add" 
dev="ggregory">CSVPrinter.printRecord(ResultSet) with metadata</action>
+    </release>
+    <release version="1.0" date="2014-08-14" description="First release (Java 
6)">
+      <action issue="CSV-125" type="fix" dev="britter">No longer works with 
Java 6</action>
+      <action issue="CSV-122" type="fix" dev="britter" due-to="Mike 
Lewis">NullPointerException when empty header string and and null string of 
""</action>
+      <action issue="CSV-117" type="update" dev="sebb">Validate format 
parameters in constructor</action>
+      <action issue="CSV-121" type="add" dev="ggregory" due-to="Sebastian 
Hardt">IllegalArgumentException thrown when the header contains duplicate names 
when the column names are empty.</action>
+      <action issue="CSV-120" type="add" dev="ggregory" due-to="Sergei 
Lebedev">CSVFormat#withHeader doesn't work with CSVPrinter</action>
+      <action issue="CSV-119" type="add" dev="ggregory" due-to="Sergei 
Lebedev">CSVFormat is missing a print(...) method</action>
+      <action issue="CSV-118" type="fix" dev="ggregory" due-to="Enrique 
Lara">CSVRecord.toMap() throws NPE on formats with no
+        headers.</action>
+      <action issue="CSV-113" type="fix" dev="sebb">Check whether ISE/IAE are 
being used appropriately</action>
+      <action issue="CSV-114" type="fix" dev="sebb">CSVFormat constructor 
should reject a header array with duplicate
+        entries
+      </action>
+      <action issue="CSV-112" type="fix" dev="britter">HeaderMap is 
inconsistent when it is parsed from an input with
+        duplicate columns names
+      </action>
+      <action issue="CSV-111" type="fix" dev="ggregory">CSVRecord.toMap() 
fails if row length shorter than header length
+      </action>
+      <action issue="CSV-106" type="fix" dev="ggregory">CSVFormat.format 
allways append null</action>
+      <action issue="CSV-105" type="add" dev="ggregory">Add Map conversion API 
to CSVRecord</action>
+      <action issue="CSV-100" type="fix" dev="ggregory">CSVParser: 
getHeaderMap throws NPE</action>
+      <action issue="CSV-42" type="update" dev="ebourg" due-to="Bob 
Smith">Lots of possible changes</action>
+      <action issue="CSV-78" type="update" dev="sebb">Use Character instead of 
char for char fields except delimiter
+      </action>
+      <action issue="CSV-99" type="update" dev="britter">Revert Builder 
implementation in CSVFormat</action>
+      <action issue="CSV-53" type="fix" dev="britter">CSVRecord does not 
verify that the length of the header mapping
+        matches the number of values
+      </action>
+      <action issue="CSV-93" type="update" dev="ggregory">Allow the handling 
of NULL values</action>
+      <action issue="CSV-68" type="update" dev="ggregory">Use the Builder 
pattern for CSVFormat</action>
+      <action issue="CSV-84" type="update" dev="sebb">Clarify comment 
handling</action>
+      <action issue="CSV-25" type="update" dev="ebourg">CSVParser.nextValue() 
seems pointless</action>
+      <action issue="CSV-97" type="update" dev="ggregory">Allow the String 
value for null to be customized for the CSV
+        printer
+      </action>
+      <action issue="CSV-88" type="update" dev="ggregory">Not possible to 
create a CSVFormat from scratch</action>
+      <action issue="CSV-52" type="add" dev="ggregory">Keep track of record 
number</action>
+      <action issue="CSV-94" type="update" dev="sebb">Lexer should only use 
char fields</action>
+      <action issue="CSV-92" type="add" dev="ggregory">Need a way to extract 
parsed headers, e.g. for use in formatting
+        output
+      </action>
+      <action issue="CSV-65" type="add" dev="ebourg">Header support</action>
+      <action issue="CSV-54" type="fix" dev="sebb">Confusing semantic of the 
ignore leading/trailing spaces parameters
+      </action>
+      <action issue="CSV-71" type="update" dev="sebb">Add convenience methods 
to CSVLexer</action>
+      <action issue="CSV-59" type="update" dev="ebourg">Is CharBuffer really 
needed, now that StringBuilder is available?
+      </action>
+      <action issue="CSV-55" type="update" dev="britter">Replace 
while(true)-loop in CSVParser.getRecord with do-while-loop
+      </action>
+      <action issue="CSV-34" type="fix" dev="sebb">CSVFormat describes itself 
as immutable, but it is not - in
+        particular it is not thread-safe
+      </action>
+      <action issue="CSV-36" type="fix" dev="yonik">Endless loops in CSV 
parser</action>
+      <action issue="CSV-13" type="fix" dev="ebourg">NullPointerException in 
CSVPrinter.print()/println()</action>
+      <action issue="CSV-45" type="update" dev="yonik">CSVPrinter 
overhaul</action>
+      <action issue="CSV-23" type="fix" dev="ebourg">Excel strategy uses wrong 
separator</action>
+      <action issue="CSV-49" type="update" dev="ebourg" due-to="Bob 
Smith">CSVStrategy has modifiable public static variables
+      </action>
+      <action issue="CSV-48" type="add" dev="ebourg">Predefined format for 
MYSQL</action>
+      <action issue="CSV-46" type="update" dev="ebourg">Reduce visibility of 
methods in internal classes</action>
+      <action issue="CSV-26" type="update" 
dev="jacopoc">ExtendedBufferedReader does too much</action>
+      <action issue="CSV-27" type="update" dev="ebourg">Decide whether to keep 
the csv.writer subpackage</action>
+    </release>
+
+  </body>
+</document>
diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java 
b/src/main/java/org/apache/commons/csv/CSVFormat.java
index 0531786..122f906 100644
--- a/src/main/java/org/apache/commons/csv/CSVFormat.java
+++ b/src/main/java/org/apache/commons/csv/CSVFormat.java
@@ -1089,8 +1089,14 @@ public final class CSVFormat implements Serializable {
         result = prime * result + (ignoreHeaderCase ? 1231 : 1237);
         result = prime * result + (ignoreEmptyLines ? 1231 : 1237);
         result = prime * result + (skipHeaderRecord ? 1231 : 1237);
+        result = prime * result + (allowDuplicateHeaderNames ? 1231 : 1237);
+        result = prime * result + (trim ? 1231 : 1237);
+        result = prime * result + (autoFlush ? 1231 : 1237);
+        result = prime * result + (trailingDelimiter ? 1231 : 1237);
+        result = prime * result + (allowMissingColumnNames ? 1231 : 1237);
         result = prime * result + ((recordSeparator == null) ? 0 : 
recordSeparator.hashCode());
         result = prime * result + Arrays.hashCode(header);
+        result = prime * result + Arrays.hashCode(headerComments);
         return result;
     }
 
diff --git a/src/test/java/org/apache/commons/csv/CSVFormatTest.java 
b/src/test/java/org/apache/commons/csv/CSVFormatTest.java
index 1d5cf56..10d48dd 100644
--- a/src/test/java/org/apache/commons/csv/CSVFormatTest.java
+++ b/src/test/java/org/apache/commons/csv/CSVFormatTest.java
@@ -1112,7 +1112,10 @@ public class CSVFormatTest {
 
     private void assertNotEquals(String name, String type, Object left, Object 
right) {
         if (left.equals(right) || right.equals(left)) {
-            System.out.println("Should not be equal for " + name + "(" + type 
+ ")");
+            fail("Objects must not compare equal for " + name + "(" + type + 
")");
+        }
+        if (left.hashCode() == right.hashCode()) {
+            fail("Hash code not be equal for " + name + "(" + type + ")");     
       
         }
     }
 

Reply via email to