Skip to content

Commit

Permalink
Fix potential NPE in InstrumentedResourceMethodApplicationListener (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
joschi committed Feb 15, 2023
1 parent 460812e commit cf4a005
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -308,7 +308,7 @@ public void onEvent(RequestEvent event) {
ContainerResponse containerResponse = event.getContainerResponse();
if (containerResponse == null && event.getException() != null) {
metric.mark(500);
} else {
} else if (containerResponse != null) {
metric.mark(containerResponse.getStatus());
}
}
Expand Down
Expand Up @@ -309,7 +309,7 @@ public void onEvent(RequestEvent event) {
ContainerResponse containerResponse = event.getContainerResponse();
if (containerResponse == null && event.getException() != null) {
metric.mark(500);
} else {
} else if (containerResponse != null) {
metric.mark(containerResponse.getStatus());
}
}
Expand Down
Expand Up @@ -308,7 +308,7 @@ public void onEvent(RequestEvent event) {
ContainerResponse containerResponse = event.getContainerResponse();
if (containerResponse == null && event.getException() != null) {
metric.mark(500);
} else {
} else if (containerResponse != null) {
metric.mark(containerResponse.getStatus());
}
}
Expand Down

0 comments on commit cf4a005

Please sign in to comment.