Skip to content

Commit

Permalink
use orElseThrow instead of get
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Feb 21, 2024
1 parent afcdc93 commit cfa46db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/cryostat/events/EventTemplates.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ public Response getTargetTemplate(
targetTemplateServiceFactory
.create(target)
.getXml(templateName, templateType)
.get();
.orElseThrow();
break;
case CUSTOM:
doc = customTemplateService.getXml(templateName, templateType).get();
doc = customTemplateService.getXml(templateName, templateType).orElseThrow();
break;
default:
throw new BadRequestException();
Expand Down

0 comments on commit cfa46db

Please sign in to comment.