Skip to content

Commit

Permalink
Fix #178: replace LRUMap with one from jackson-databind (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder authored Dec 16, 2023
1 parent 9e52738 commit 60e6941
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
import com.fasterxml.jackson.core.*;

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

import com.fasterxml.jackson.jaxrs.cfg.*;
import com.fasterxml.jackson.jaxrs.util.ClassKey;
import com.fasterxml.jackson.jaxrs.util.LRUMap;

public abstract class ProviderBase<
THIS extends ProviderBase<THIS, MAPPER, EP_CONFIG, MAPPER_CONFIG>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
import java.util.LinkedHashMap;
import java.util.Map;

// TO BE REMOVED FROM JACKSON 2.18 or later
/**
* Helper for simple bounded LRU maps used for reusing lookup values.
*
* @since 2.2
*
* @deprecated Since 2.16.1 Use one from {@code jackson-databind} instead.
*/
@Deprecated // since 2.16.1
@SuppressWarnings("serial")
public class LRUMap<K,V> extends LinkedHashMap<K,V>
{
Expand All @@ -24,5 +28,4 @@ protected boolean removeEldestEntry(Map.Entry<K,V> eldest)
{
return size() > _maxEntries;
}

}
4 changes: 4 additions & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Sub-modules:
=== Releases ===
------------------------------------------------------------------------

2.16.1 (not yet released)

#178: Deprecate local `LRUMap`, use `jackson-databind` provided one instead

2.16.0 (15-Nov-2023)

No changes since 2.15
Expand Down

0 comments on commit 60e6941

Please sign in to comment.