Skip to content

Commit

Permalink
Post-merge cleanup for 2.17 wrt #178
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Dec 16, 2023
1 parent 6a3771f commit 6e18dac
Showing 1 changed file with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.util.LRUMap;
import com.fasterxml.jackson.databind.util.LookupCache;
import com.fasterxml.jackson.databind.type.TypeFactory;

import com.fasterxml.jackson.jaxrs.cfg.*;
Expand Down Expand Up @@ -158,14 +159,12 @@ public abstract class ProviderBase<
/**
* Cache for resolved endpoint configurations when reading JSON data
*/
protected final LRUMap<AnnotationBundleKey, EP_CONFIG> _readers
= new LRUMap<AnnotationBundleKey, EP_CONFIG>(16, 120);
protected final LookupCache<AnnotationBundleKey, EP_CONFIG> _readers;

/**
* Cache for resolved endpoint configurations when writing JSON data
*/
protected final LRUMap<AnnotationBundleKey, EP_CONFIG> _writers
= new LRUMap<AnnotationBundleKey, EP_CONFIG>(16, 120);
protected final LookupCache<AnnotationBundleKey, EP_CONFIG> _writers;

/*
/**********************************************************
Expand All @@ -174,8 +173,9 @@ public abstract class ProviderBase<
*/

protected ProviderBase(MAPPER_CONFIG mconfig) {
_mapperConfig = mconfig;
_jaxRSFeatures = JAXRS_FEATURE_DEFAULTS;
this(mconfig,
new LRUMap<>(16, 120),
new LRUMap<>(16, 120));
}

/**
Expand All @@ -186,10 +186,22 @@ protected ProviderBase(MAPPER_CONFIG mconfig) {
*/
@Deprecated // just to denote it should NOT be directly called; will NOT be removed
protected ProviderBase() {
_mapperConfig = null;
this(null);
}

/**
* @since 2.17
*/
protected ProviderBase(MAPPER_CONFIG mconfig,
LookupCache<AnnotationBundleKey, EP_CONFIG> readerCache,
LookupCache<AnnotationBundleKey, EP_CONFIG> writerCache)
{
_mapperConfig = mconfig;
_jaxRSFeatures = JAXRS_FEATURE_DEFAULTS;
_readers = readerCache;
_writers = writerCache;
}

/*
/**********************************************************
/* Configuring
Expand Down

0 comments on commit 6e18dac

Please sign in to comment.