TDecorators#wrap produces an inconsistent map

Issue #60 new
Sergei Lebedev
created an issue

It seems that having 0 as default for noEntryKey breaks the behaviour of the wrapper maps. Consider an example:

public class Example {
  public static void main(final String[] args) {
    final TIntObjectMap<String> m = new TIntObjectHashMap<>();
    m.put(0, "foo");

    System.out.println(TDecorators.wrap(m).containsKey(0));  // true
    System.out.println(TDecorators.wrap(m).keySet());        // [null]
  }
}

Comments (3)

  1. Log in to comment