Skip to content

Commit

Permalink
NIFI-3364 Changed part of a comment and moved isBlank check to after …
Browse files Browse the repository at this point in the history
…map()
  • Loading branch information
jrsteinebrey committed Nov 5, 2024
1 parent a87af83 commit c5aac58
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
package org.apache.nifi.bootstrap.configuration;

import static java.util.function.Predicate.not;

import java.io.IOException;
import java.io.InputStream;
import java.io.UncheckedIOException;
Expand Down Expand Up @@ -63,17 +65,17 @@ 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 the list sorted by java.arg names in ascending alphabetical order
*
* @return Additional arguments
*/
@Override
public List<String> getAdditionalArguments() {
return bootstrapProperties.stringPropertyNames().stream()
.filter(name -> name.startsWith(BootstrapProperty.JAVA_ARGUMENT.getProperty()))
.filter(name -> !bootstrapProperties.getProperty(name).isBlank())
.sorted()
.map(bootstrapProperties::getProperty)
.filter(not(String::isBlank))
.toList();
}

Expand Down

0 comments on commit c5aac58

Please sign in to comment.