jrsteinebrey commented on code in PR #9490:
URL: https://github.com/apache/nifi/pull/9490#discussion_r1830061561
##########
nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/configuration/StandardConfigurationProvider.java:
##########
@@ -64,23 +65,18 @@ public StandardConfigurationProvider(final Map<String,
String> environmentVariab
/**
* Get additional arguments for application command from Bootstrap
Properties starting with java.arg
+ * Return the list sorted by java.arg names (not values) in ascending
alphabetical order
*
* @return Additional arguments
*/
@Override
public List<String> getAdditionalArguments() {
- final List<String> additionalArguments = new ArrayList<>();
-
- for (final String propertyName :
bootstrapProperties.stringPropertyNames()) {
- if
(propertyName.startsWith(BootstrapProperty.JAVA_ARGUMENT.getProperty())) {
- final String additionalArgument =
bootstrapProperties.getProperty(propertyName);
- if (!additionalArgument.isBlank()) {
- additionalArguments.add(additionalArgument);
- }
- }
- }
-
- return additionalArguments;
+ return new
ArrayList<>(bootstrapProperties.stringPropertyNames()).stream()
+ .filter(name ->
name.startsWith(BootstrapProperty.JAVA_ARGUMENT.getProperty()))
+ .filter(name ->
!bootstrapProperties.getProperty(name).isBlank())
Review Comment:
I made all the changes you recommended. Please review again and see if they
meet your expectations.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]