Skip to content

Commit

Permalink
handle nullable return value
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Mar 20, 2024
1 parent 8e847fc commit e73ae62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/io/cryostat/JsonRequestFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public class JsonRequestFilter implements ContainerRequestFilter {
public void filter(ContainerRequestContext requestContext) throws IOException {
if (requestContext.getMediaType() != null
&& requestContext.getMediaType().isCompatible(MediaType.APPLICATION_JSON_TYPE)
&& !allowedPaths.contains(requestContext.getUriInfo().getPath())) {
&& (requestContext.getUriInfo() != null
&& !allowedPaths.contains(requestContext.getUriInfo().getPath()))) {
try (InputStream stream = requestContext.getEntityStream()) {
JsonNode rootNode = objectMapper.readTree(stream);

Expand Down

0 comments on commit e73ae62

Please sign in to comment.