Skip to content
Permalink
Browse files
8265047: Inconsistent warning message in jcmd VM.log
Reviewed-by: dholmes, stuefe, sspitsyn
  • Loading branch information
jyukutyo authored and tstuefe committed May 6, 2021
1 parent ea30bd6 commit 51f5adfca3854b1556bb73e08e0b3e733ab6161b
Showing 1 changed file with 5 additions and 2 deletions.
@@ -427,6 +427,7 @@ bool LogConfiguration::parse_log_arguments(const char* outputstr,

ConfigurationLock cl;
size_t idx;
bool added = false;
if (outputstr[0] == '#') { // Output specified using index
int ret = sscanf(outputstr + 1, SIZE_FORMAT, &idx);
if (ret != 1 || idx >= _n_outputs) {
@@ -447,16 +448,18 @@ bool LogConfiguration::parse_log_arguments(const char* outputstr,
LogOutput* output = new_output(normalized, output_options, errstream);
if (output != NULL) {
idx = add_output(output);
added = true;
}
} else if (output_options != NULL && strlen(output_options) > 0) {
errstream->print_cr("Output options for existing outputs are ignored.");
}

FREE_C_HEAP_ARRAY(char, normalized);
if (idx == SIZE_MAX) {
return false;
}
}
if (!added && output_options != NULL && strlen(output_options) > 0) {
errstream->print_cr("Output options for existing outputs are ignored.");
}
configure_output(idx, selections, decorators);
notify_update_listeners();
selections.verify_selections(errstream);

1 comment on commit 51f5adf

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 51f5adf May 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.