Skip to content

Commit fc84b66

Browse files
committed
wip
1 parent 68fa3a0 commit fc84b66

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
<dependency>
127127
<groupId>com.fasterxml.jackson.core</groupId>
128128
<artifactId>jackson-core</artifactId>
129-
<version>2.16.0-rc1</version>
129+
<version>2.16.0</version>
130130
</dependency>
131131
<dependency>
132132
<groupId>com.fasterxml.jackson.core</groupId>

src/main/java/io/vertx/core/json/jackson/HybridJacksonPool.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*/
3232
public class HybridJacksonPool implements RecyclerPool<BufferRecycler> {
3333

34-
static final RecyclerPool INSTANCE = new HybridJacksonPool();
34+
private static final RecyclerPool INSTANCE = new HybridJacksonPool();
3535

3636
private static final Predicate<Thread> isVirtual = VirtualPredicate.findIsVirtualPredicate();
3737

@@ -42,6 +42,10 @@ static class VirtualPoolHolder {
4242
private static final RecyclerPool<BufferRecycler> virtualPool = new StripedLockFreePool(Runtime.getRuntime().availableProcessors());
4343
}
4444

45+
public static RecyclerPool getInstance() {
46+
return INSTANCE;
47+
}
48+
4549
@Override
4650
public BufferRecycler acquirePooled() {
4751
return isVirtual.test(Thread.currentThread()) ? VirtualPoolHolder.virtualPool.acquirePooled()

src/main/java/io/vertx/core/json/jackson/JacksonCodec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
*/
5454
public class JacksonCodec implements JsonCodec {
5555

56-
private static final JsonFactory factory = JsonFactory.builder().recyclerPool(HybridJacksonPool.INSTANCE).build();
56+
private static final JsonFactory factory = JsonFactory.builder().recyclerPool(HybridJacksonPool.getInstance()).build();
5757

5858
static {
5959
// Non-standard JSON but we allow C style comments in our JSON

0 commit comments

Comments
 (0)