I would have expected that it should simply return null, as in "did not find value".
At least, that is how the JDK equivalents work. Greg Brown wrote: > Yes, that is a bug. It should throw IllegalArgumentException. I'll fix it. > > On Nov 18, 2009, at 7:54 AM, Noel Grandin wrote: > > >> Ah, I see. >> >> I only ask because when code calls HashMap#get(T key) with a null key, >> it throws an NPE. >> >> I'm not sure if it's a bug, but it definitely not what I expect. >> >> -- Noel. >> >> Todd Volkert wrote: >> >>> It was intentional just because of lack of use cases, though support could >>> easily be added later by masking null. Good point that it should be noted >>> in the Javadoc :) >>> >>> On Wed, Nov 18, 2009 at 7:45 AM, Noel Grandin <noelgran...@gmail.com> wrote: >>> >>> >>> >>>> Hi >>>> >>>> I note that apache.pivot.collections.HashMap does not support null keys. >>>> Is this intentional? >>>> >>>> If so, it should probably be noted in the javadoc. >>>> >>>> -- Noel. >>>> >>>> >>>> >>> > >