That is probably kind of like #1356 - although it will be important to avoid a double lookup in get. But can maybe check if get returns null and default is non-null, then do the extra containsKey lookup.
tonskyThu 18 Aug 2011
Hi brian,
while thinking about avoiding double lookup and your solution I actually implemented it:
tonsky Thu 18 Aug 2011
If value
=== null
,Map.get
behaves like there’s no such key in a map:Expected:
brian Thu 18 Aug 2011
Promoted to ticket #1617 and assigned to brian
That is probably kind of like #1356 - although it will be important to avoid a double lookup in
get
. But can maybe check if get returns null and default is non-null, then do the extra containsKey lookup.tonsky Thu 18 Aug 2011
Hi brian,
while thinking about avoiding double lookup and your solution I actually implemented it:
brian Wed 24 Aug 2011
Ticket resolved in 1.0.60
changeset