Skip to content

Commit d7f32ca

Browse files
committed
Minor update
1 parent b67c13b commit d7f32ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

msgpack-jackson/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ When you want to use non-String value as a key of Map, use `MessagePackKeySerial
318318

319319
### Serialize a nested object that also serializes
320320

321-
When you serialize an object that has a nested object also serializing with ObjectMapper and MessagePackFactory like the following code
321+
When you serialize an object that has a nested object also serializing with ObjectMapper and MessagePackFactory like the following code, it throws NullPointerException since the nested MessagePackFactory modifies a shared state stored in ThreadLocal.
322322

323323
```java
324324
@Test
@@ -347,7 +347,7 @@ 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)`. It might be inconvenient to call the API for users, but it's a reasonable tradeoff with performance for now.
350+
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(

0 commit comments

Comments
 (0)