MikeThomsen commented on a change in pull request #3613: NIFI-6502 Add
padLeft() and padRight() functions to RecordPath functions
URL: https://github.com/apache/nifi/pull/3613#discussion_r314952837
##########
File path:
nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/StringUtils.java
##########
@@ -78,25 +78,63 @@ public static String join(final Collection collection,
String delimiter) {
return sb.toString().substring(0, sb.lastIndexOf(delimiter));
}
- public static String padLeft(final String source, int length, char
padding) {
- if (source != null) {
+ public static String padLeft(final String source, int length, String
padding) {
Review comment:
Yeah. I think it would make more sense for us to do that. Since NiFi and
commons-lang3 are ASF projects, I think the L&N will just need to be a javadoc
line above each copied method of `StringUtils` that says prominently something
like this:
```
/**
* This method was copied verbatim from Apache commons-lang3. Apache
commons-lang3
* was provided under the ASLv2 and is Copyright 2019 Apache Software
Foundation.
```
@joewitt does that seem right to you?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services