From 6ffce5335b9824ade8e728e3cb9e05198678d420 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Tue, 28 May 2019 23:45:25 -0400 Subject: [PATCH] Standardize on US spelling of "behavior". --- RELEASE-NOTES.txt | 2 +- src/changes/changes.xml | 2 +- src/main/java/org/apache/commons/csv/CSVFormat.java | 4 ++-- src/test/java/org/apache/commons/csv/CSVParserTest.java | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 34973539..ac4304f0 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -193,7 +193,7 @@ o CSV-161: Fix Javadoc to say CSVFormat with() methods return a new CSVFormat. CHANGES ============ -o CSV-167: Comment line hides next record; update Javadoc to make behaviour clear. Thanks to Rene. +o CSV-167: Comment line hides next record; update Javadoc to make behavior clear. Thanks to Rene. o CSV-153: CSVPrinter doesn't skip creation of header record if skipHeaderRecord is set to true. Thanks to Wren. diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 2fa93696..4ff7e17e 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -83,7 +83,7 @@ Add shortcut method for using first record as header to CSVFormat Add withHeader(Class<? extends Enum>) to CSVFormat - Comment line hides next record; update Javadoc to make behaviour clear + Comment line hides next record; update Javadoc to make behavior clear CSVPrinter doesn't skip creation of header record if skipHeaderRecord is set to true Add IgnoreCase option for accessing header names The null string should be case-sensitive when reading records diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index 1c0e2d4d..98f57241 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -1688,9 +1688,9 @@ public final class CSVFormat implements Serializable { } /** - * Returns a new {@code CSVFormat} with duplicate header names behaviour set to the given value. + * Returns a new {@code CSVFormat} with duplicate header names behavior set to the given value. * - * @return a new {@code CSVFormat} with duplicate header names behaviour set to the given value + * @return a new {@code CSVFormat} with duplicate header names behavior set to the given value */ public CSVFormat withAllowDuplicateHeaderNames(final boolean allowDuplicateHeaderNames) { return new CSVFormat(delimiter, quoteCharacter, quoteMode, commentMarker, escapeCharacter, diff --git a/src/test/java/org/apache/commons/csv/CSVParserTest.java b/src/test/java/org/apache/commons/csv/CSVParserTest.java index 10bb3c54..14293bc2 100644 --- a/src/test/java/org/apache/commons/csv/CSVParserTest.java +++ b/src/test/java/org/apache/commons/csv/CSVParserTest.java @@ -319,7 +319,7 @@ public class CSVParserTest { } @Test - public void testEmptyLineBehaviourCSV() throws Exception { + public void testEmptyLineBehaviorCSV() throws Exception { final String[] codes = { "hello,\r\n\r\n\r\n", "hello,\n\n\n", "hello,\"\"\r\n\r\n\r\n", "hello,\"\"\n\n\n" }; final String[][] res = { { "hello", "" } // CSV format ignores empty lines }; @@ -336,7 +336,7 @@ public class CSVParserTest { } @Test - public void testEmptyLineBehaviourExcel() throws Exception { + public void testEmptyLineBehaviorExcel() throws Exception { final String[] codes = { "hello,\r\n\r\n\r\n", "hello,\n\n\n", "hello,\"\"\r\n\r\n\r\n", "hello,\"\"\n\n\n" }; final String[][] res = { { "hello", "" }, { "" }, // Excel format does not ignore empty lines { "" } }; @@ -372,7 +372,7 @@ public class CSVParserTest { } @Test - public void testEndOfFileBehaviourExcel() throws Exception { + public void testEndOfFileBehaviorExcel() throws Exception { final String[] codes = { "hello,\r\n\r\nworld,\r\n", "hello,\r\n\r\nworld,", "hello,\r\n\r\nworld,\"\"\r\n", "hello,\r\n\r\nworld,\"\"", "hello,\r\n\r\nworld,\n", "hello,\r\n\r\nworld,", "hello,\r\n\r\nworld,\"\"\n", "hello,\r\n\r\nworld,\"\"" };