Github user Wesley-Lawrence commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2088#discussion_r138190101
--- Diff:
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/SingleCharacterValidator.java
---
@@ -31,10 +31,23 @@
illegalChars.add("\n");
}
+ boolean allowEmpty = false;
+
+ public SingleCharacterValidator(boolean allowEmpty) {
+ this.allowEmpty = allowEmpty;
+ }
+
@Override
public ValidationResult validate(final String subject, final String
input, final ValidationContext context) {
final String unescaped = CSVUtils.unescape(input);
- if (unescaped.length() != 1) {
+ if (allowEmpty && unescaped.length() > 1) {
--- End diff --
Good catch. I'll have to figure out why the unit tests didn't catch that...
---