Skip to content

Commit

Permalink
NIFI-3364 Remove new ArrayList() and use toList() instead of collect().
Browse files Browse the repository at this point in the history
  • Loading branch information
jrsteinebrey committed Nov 5, 2024
1 parent e331c44 commit a87af83
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Properties;
import java.util.stream.Collectors;

/**
* Standard implementation of Configuration Provider based on NIFI_HOME environment variable base directory
Expand Down Expand Up @@ -71,12 +69,12 @@ public StandardConfigurationProvider(final Map<String, String> environmentVariab
*/
@Override
public List<String> getAdditionalArguments() {
return new ArrayList<>(bootstrapProperties.stringPropertyNames()).stream()
return bootstrapProperties.stringPropertyNames().stream()
.filter(name -> name.startsWith(BootstrapProperty.JAVA_ARGUMENT.getProperty()))
.filter(name -> !bootstrapProperties.getProperty(name).isBlank())
.sorted()
.map(bootstrapProperties::getProperty)
.collect(Collectors.toCollection(ArrayList::new));
.toList();
}

/**
Expand Down

0 comments on commit a87af83

Please sign in to comment.