peter-lawrey / HugeCollections-OLD

Huge Collections for Java using efficient off heap storage
273 stars 51 forks source link

Updating an existing entry in HugeHashMap does not work #1

Closed kheneghan closed 10 years ago

kheneghan commented 10 years ago

Hi

There appears to be a bug in the master branch which means that updating an existing entry in HugeHashMap does not work, i.e.

    HugeConfig config = HugeConfig.DEFAULT.clone();

    HugeHashMap<Long, Long> map1 = 
            new HugeHashMap<Long, Long>(config, Long.class, Long.class);

    long key = 55;

    map1.put(key, 10L);
    System.out.println(key + " => " + map1.get(key));
    map1.put(key, 20L);
    System.out.println(key + " => " + map1.get(key));

outputs

55 => 10 55 => 10

cheers Kilian

peter-lawrey commented 10 years ago

I have added a test and a fix for this.