taz1988 commented on code in PR #10464:
URL: https://github.com/apache/nifi/pull/10464#discussion_r2463199288
##########
nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/command/StandardBootstrapCommandProvider.java:
##########
@@ -152,8 +157,12 @@ private BootstrapCommand getDiagnosticsCommand(final
ProcessHandleProvider proce
private ResponseStreamHandler getDiagnosticsResponseStreamHandler(final
String[] arguments) {
final ResponseStreamHandler responseStreamHandler;
- if (arguments.length == PATH_ARGUMENTS) {
- final String outputPathArgument = arguments[FIRST_ARGUMENT];
+ String[] filteredArguments = Stream.of(arguments)
+ .filter(argument -> !VERBOSE_REQUESTED.contentEquals(argument))
+ .toArray(String[]::new);
+
+ if (filteredArguments.length == PATH_ARGUMENTS) {
Review Comment:
yeah but if there is one, that means user only added diagnostics command and
not defined path, so that it works well. But I agree I thought maybe it would
be better to extract this to a method. I will do the changes after next week as
I am on a little vacation now :)
--
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]