Skip to content

Commit

Permalink
Correctly fix NPE in servlet AsyncListener (#10250)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasrutishauser authored Jan 18, 2024
1 parent 61e2987 commit 35b143a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ public void onError(AsyncEvent event) {

@Override
public void onStartAsync(AsyncEvent event) {
event.getAsyncContext().addListener(this);
event
.getAsyncContext()
.addListener(this, event.getSuppliedRequest(), event.getSuppliedResponse());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ public void onError(AsyncEvent event) {

@Override
public void onStartAsync(AsyncEvent event) {
event.getAsyncContext().addListener(this);
event
.getAsyncContext()
.addListener(this, event.getSuppliedRequest(), event.getSuppliedResponse());
}
}
}

0 comments on commit 35b143a

Please sign in to comment.