Skip to content

Commit

Permalink
Remove document reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Matsuoka authored and andrewazores committed May 21, 2024
1 parent 65c5570 commit 0f5921e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main/java/io/cryostat/events/S3TemplateService.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
import io.cryostat.StorageBuckets;
import io.cryostat.core.FlightRecorderException;
import io.cryostat.core.templates.MutableTemplateService;
import io.cryostat.core.templates.MutableTemplateService.InvalidEventTemplateException;
import io.cryostat.core.templates.MutableTemplateService.InvalidXmlException;
import io.cryostat.core.templates.Template;
import io.cryostat.core.templates.TemplateType;
import io.cryostat.ws.MessagingServer;
Expand Down Expand Up @@ -158,9 +156,9 @@ public List<Template> getTemplates() throws FlightRecorderException {
public Optional<String> getXml(String templateName, TemplateType unused)
throws FlightRecorderException {
try (var stream = getModel(templateName)) {
Document doc =
Jsoup.parse(stream, StandardCharsets.UTF_8.name(), "", Parser.xmlParser());
return Optional.of(doc.outerHtml());
return Optional.of(
Jsoup.parse(stream, StandardCharsets.UTF_8.name(), "", Parser.xmlParser())
.outerHtml());
} catch (IOException e) {
logger.error(e);
return Optional.empty();
Expand Down

0 comments on commit 0f5921e

Please sign in to comment.