This is an automated email from the ASF dual-hosted git repository.
pvillard pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 6877e84931 NIFI-11135 Upgraded Commons CSV from 1.9.0 to 1.10.0
6877e84931 is described below
commit 6877e8493186f6efc4d8e370b6503f85cf0ee70c
Author: exceptionfactory <[email protected]>
AuthorDate: Thu Feb 2 15:58:07 2023 -0600
NIFI-11135 Upgraded Commons CSV from 1.9.0 to 1.10.0
Signed-off-by: Pierre Villard <[email protected]>
This closes #6921.
---
.../nifi-record-utils/nifi-standard-record-utils/pom.xml | 2 +-
.../nifi-lookup-services/pom.xml | 2 +-
.../nifi-record-serialization-services/pom.xml | 2 +-
.../test/java/org/apache/nifi/csv/TestCSVRecordReader.java | 13 +++----------
4 files changed, 6 insertions(+), 13 deletions(-)
diff --git
a/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-standard-record-utils/pom.xml
b/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-standard-record-utils/pom.xml
index 26c8cbcbd9..7b2199bdc8 100644
---
a/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-standard-record-utils/pom.xml
+++
b/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-standard-record-utils/pom.xml
@@ -54,7 +54,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
- <version>1.9.0</version>
+ <version>1.10.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
diff --git
a/nifi-nar-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/pom.xml
b/nifi-nar-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/pom.xml
index 053502413a..19473093a6 100644
---
a/nifi-nar-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/pom.xml
+++
b/nifi-nar-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/pom.xml
@@ -59,7 +59,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
- <version>1.9.0</version>
+ <version>1.10.0</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
diff --git
a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/pom.xml
b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/pom.xml
index d307fbda4a..2042711508 100755
---
a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/pom.xml
+++
b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/pom.xml
@@ -64,7 +64,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
- <version>1.9.0</version>
+ <version>1.10.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
diff --git
a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/csv/TestCSVRecordReader.java
b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/csv/TestCSVRecordReader.java
index da2fd9ee23..8ab596f689 100644
---
a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/csv/TestCSVRecordReader.java
+++
b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/test/java/org/apache/nifi/csv/TestCSVRecordReader.java
@@ -50,6 +50,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
public class TestCSVRecordReader {
private final DataType doubleDataType =
RecordFieldType.DOUBLE.getDataType();
@@ -826,11 +827,7 @@ public class TestCSVRecordReader {
final CSVFormat disallowDuplicateHeadersFormat =
CSVFormat.DEFAULT.withFirstRecordAsHeader().withTrim().withQuote('"').withAllowDuplicateHeaderNames(false);
try (final InputStream bais = new ByteArrayInputStream(inputData)) {
final IllegalArgumentException iae =
assertThrows(IllegalArgumentException.class, () -> createReader(bais, schema,
disallowDuplicateHeadersFormat));
- assertEquals(
- "The header contains a duplicate name: \"id\" in [id, id,
name, name, balance, BALANCE, address, city, state, zipCode, country]. " +
- "If this is valid then use
CSVFormat.withAllowDuplicateHeaderNames().",
- iae.getMessage()
- );
+ assertTrue(iae.getMessage().startsWith("The header contains a
duplicate name"));
}
}
@@ -870,11 +867,7 @@ public class TestCSVRecordReader {
final CSVFormat disallowDuplicateHeadersFormat =
CSVFormat.RFC4180.withTrim().withAllowDuplicateHeaderNames(false);
try (final InputStream bais = new ByteArrayInputStream(inputData)) {
final IllegalArgumentException iae =
assertThrows(IllegalArgumentException.class, () -> createReader(bais, schema,
disallowDuplicateHeadersFormat, false));
- assertEquals(
- "The header contains a duplicate name: \"id\" in [id, id,
name, name, balance, BALANCE, address, city, state, zipCode, country]. " +
- "If this is valid then use
CSVFormat.withAllowDuplicateHeaderNames().",
- iae.getMessage()
- );
+ assertTrue(iae.getMessage().startsWith("The header contains a
duplicate name"));
}
}