Github user ajs6f commented on a diff in the pull request:

    https://github.com/apache/jena/pull/57#discussion_r29958012
  
    --- Diff: 
jena-base/src/main/java/org/apache/jena/atlas/lib/cache/CacheSimple.java ---
    @@ -37,120 +37,81 @@
     
     public class CacheSimple<K,V> implements Cache<K,V>
     {
    -    private final V[] values ; 
    -    private final K[] keys ;
    -    private final int size ;
    -    private int currentSize = 0 ;
    -    private BiConsumer<K,V> dropHandler = null ;
    +   private Map<K,V> internalCache;
    +   
    --- End diff --
    
    Just to be clear, am I correct to be thinking that a `CacheSimple` should 
never expand beyond the size of its constructor argument? I'm asking because 
that's exactly what my new test checked, and it passes for my `LinkedHashMap` 
impl, but not for the original. I build a `CacheSimple<Integer>(5)` and put 10 
things in it, mapped from 10 different keys each to the same value, and then 
its `size()` is 10 when it should only be 5. Or am I misunderstanding the 
policy here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to