Skip to content

Commit b67c13b

Browse files
committed
Minor change
1 parent 961fd26 commit b67c13b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

msgpack-jackson/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,10 @@ When you serialize an object that has a nested object also serializing with Obje
347347
}
348348
```
349349

350-
This code throws NullPointerException since the nested MessagePackFactory modifies a shared state stored in ThreadLocal. There are a few options to fix this issue, but they introduce performance degredations while this usage is a corner case. A workaround that doesn't affect performance is to call `MessagePackFactory#setReuseResourceInGenerator(false)`. I think it might be inconvenient to call the API for users, but it's a reasonable tradeoff with performance for now.
350+
This code throws NullPointerException since the nested MessagePackFactory modifies a shared state stored in ThreadLocal. There are a few options to fix this issue, but they introduce performance degredations while this usage is a corner case. A workaround that doesn't affect performance is to call `MessagePackFactory#setReuseResourceInGenerator(false)`. It might be inconvenient to call the API for users, but it's a reasonable tradeoff with performance for now.
351351

352352
```java
353353
ObjectMapper objectMapper = new ObjectMapper(
354354
new MessagePackFactory().setReuseResourceInGenerator(false));
355-
```
355+
```
356+

0 commit comments

Comments
 (0)