Skip to content

Commit

Permalink
Fixed warning about thread-safety
Browse files Browse the repository at this point in the history
  • Loading branch information
lwitkowski committed Oct 27, 2023
1 parent f805370 commit d1386b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ quarkus.log.category.http-problem.level=OFF # disables all problems-related logg
If you want to intercept, change or augment a mapped `HttpProblem` before it gets serialized into raw HTTP response
body, you can create a bean extending `ProblemPostProcessor`, and override `apply` method.
**Important: Make sure your implementation is thread-safe, as it may potentially be called concurrently if multiple
requests throw exceptions at the same time.**
Example:
```java
@ApplicationScoped
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public interface ProblemPostProcessor {
* Interceptor method for HttpProblems. In case problem should be changed or enhanced, one can use
* 'HttpProblem.builder(httpProblem)'.
* <p>
* Should be thread-safe.
* Implementations should be thread-safe.
*
* @param problem Original HttpProblem, possibly processed by other processors with higher priority.
* @param context Additional, internal metadata not included in HttpProblem
Expand Down

0 comments on commit d1386b5

Please sign in to comment.