Skip to content

Commit

Permalink
Don't add null port to hostname attribute on JFR events
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonjkeller committed Jan 6, 2025
1 parent 13ad7f1 commit a140bb6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ private String getHostname() {
logger.error(e.getMessage());
host = InetAddress.getLoopbackAddress().getHostAddress();
}
return String.format("%s:%s", host, appPort);
if (appPort != null) {
return String.format("%s:%s", host, appPort);
} else {
return host;
}
}

@VisibleForTesting
Expand Down

0 comments on commit a140bb6

Please sign in to comment.