exceptionfactory commented on code in PR #10464:
URL: https://github.com/apache/nifi/pull/10464#discussion_r2463102700
##########
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:
After filtering the number of arguments, the resulting length would be one.
However, filtering the arguments and checking the length, it seems better to
have a separate method for finding the path argument that simply returns the
value that is no the verbose argument.
##########
nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/command/ManagementServerBootstrapCommand.java:
##########
@@ -107,6 +107,14 @@ public void run() {
}
}
+ public ManagementServerPath getManagementServerPath() {
+ return managementServerPath;
+ }
+
+ public ResponseStreamHandler getResponseStreamHandler() {
+ return responseStreamHandler;
+ }
Review Comment:
This methods are not needed for runtime operation, so they should be removed.
--
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]