Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Azores <aazores@redhat.com>
  • Loading branch information
andrewazores committed Mar 16, 2023
1 parent 1bd6609 commit 029c312
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/main/java/io/cryostat/net/AgentConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,7 @@ public Optional<Document> getXml(String name, TemplateType type)

@Override
public boolean isConnected() {
try {
return client.ping().toCompletionStage().toCompletableFuture().get();
} catch (ExecutionException | InterruptedException e) {
logger.warn(e);
return false;
}
return true;
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/io/cryostat/net/web/WebServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ public String getAssetDownloadURL(ApiVersion apiVersion, String... pathSegments)
}

private String getTargetId(JFRConnection conn) throws IOException {
// TODO this is a hack
// TODO this is a hack, the JFRConnection interface should be refactored to expose a more
// general connection URL / targetId method since the JMX implementation is now only one
// possible implementation
if (conn instanceof AgentConnection) {
return ((AgentConnection) conn).getUri().toString();
}
Expand Down

0 comments on commit 029c312

Please sign in to comment.