Skip to content

Commit

Permalink
8334164: The fix for JDK-8322811 should use _filename.is_set() rather…
Browse files Browse the repository at this point in the history
… than strcmp()

Reviewed-by: dholmes, cjplummer
  • Loading branch information
Sonia Zaldana Calles authored and jerboaa committed Jun 20, 2024
1 parent d7dad50 commit cabd104
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hotspot/share/services/diagnosticCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1203,11 +1203,11 @@ SystemDumpMapDCmd::SystemDumpMapDCmd(outputStream* output, bool heap) :
void SystemDumpMapDCmd::execute(DCmdSource source, TRAPS) {
stringStream defaultname;
const char* name = nullptr;
if (::strcmp(default_filename, _filename.value()) == 0) {
if (_filename.is_set()) {
name = _filename.value();
} else {
defaultname.print("vm_memory_map_%d.txt", os::current_process_id());
name = defaultname.base();
} else {
name = _filename.value();
}
fileStream fs(name);
if (fs.is_open()) {
Expand Down

1 comment on commit cabd104

@openjdk-notifier
Copy link

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.