Skip to content

Commit

Permalink
Use LRUCache instead of HashMap
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospassos authored and cowtowncoder committed Sep 19, 2020
1 parent ebb8ac9 commit 80b8a19
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.fasterxml.jackson.dataformat.avro.schema;

import com.fasterxml.jackson.databind.util.LRUMap;
import java.io.File;
import java.math.BigDecimal;
import java.math.BigInteger;
Expand All @@ -24,7 +25,7 @@

public abstract class AvroSchemaHelper
{
private static final Map<String, String> SCHEMA_NAME_CACHE = new HashMap<>();
private static final LRUMap<String, String> SCHEMA_NAME_CACHE = new LRUMap<>(16, 1024);

/**
* Dedicated mapper for handling default values (String &lt;-&gt; JsonNode &lt;-&gt; Object)
Expand Down

0 comments on commit 80b8a19

Please sign in to comment.