Skip to content

Commit f3b4d76

Browse files
authored
Implement #1117: change the default RecyclerPool to use (#1205)
1 parent 51d226b commit f3b4d76

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

release-notes/VERSION-2.x

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ a pure JSON library.
1919
#507: Add `JsonWriteFeature.ESCAPE_FORWARD_SLASHES` to allow escaping of '/' for
2020
String values
2121
(contributed by Joo-Hyuk K)
22+
#1117: Change default `RecylerPool` implementation to `newLockFreePool` (from
23+
`threadLocalPool`)
2224
#1137: Improve detection of "is a NaN" to only consider explicit cases,
2325
not `double` overflow/underflow
2426
#1145: `JsonPointer.appendProperty(String)` does not escape the property name

src/main/java/com/fasterxml/jackson/core/util/JsonRecyclerPools.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@
1818
public final class JsonRecyclerPools
1919
{
2020
/**
21-
* @return the default {@link RecyclerPool} implementation
22-
* which is the thread local based one:
23-
* basically alias to {@link #threadLocalPool()}).
21+
* Method to call to get the default recycler pool instance:
22+
* as of Jackson 2.17 this is same as calling
23+
* {@link #newLockFreePool()}; earlier
24+
*
25+
* @return the default {@link RecyclerPool} implementation to use
26+
* if no specific implementation desired.
2427
*/
2528
public static RecyclerPool<BufferRecycler> defaultPool() {
26-
return threadLocalPool();
29+
return newLockFreePool();
2730
}
2831

2932
/**

0 commit comments

Comments
 (0)