Re: Suggestion for a more sensible implementation of EMPTY_MAP

2019-07-01 Thread Abraham Marín Pérez
> On 27 Jun 2019, at 22:38, Stuart Marks wrote: > > > > On 6/19/19 12:51 AM, Abraham Marín Pérez wrote: >> private void decorate(Map data) { >> //... >> data.computeIfPresent("field", (k, v) -> highlightDifferences(v, >> otherVa

Re: Suggestion for a more sensible implementation of EMPTY_MAP

2019-06-19 Thread Abraham Marín Pérez
EMPTY_MAP a risk and less useful and a cautious programmer will avoid it. $.02, Roger On 6/13/19 8:42 PM, Stuart Marks wrote: > > > On 6/10/19 7:34 AM, Abraham Marín Pérez wrote: >> I agree that it makes sense for EMPTY_MAP to have the same logic as >> Map.of() or unmodifiable

Re: Suggestion for a more sensible implementation of EMPTY_MAP

2019-06-10 Thread Abraham Marín Pérez
Hi Michael, Many thanks for your reply, I can definitely see your point. I agree that it makes sense for EMPTY_MAP to have the same logic as Map.of() or unmodifiable(new HashMap()), which means that my suggestion cannot be applied to just EMPTY_MAP... but maybe that’s ok: maybe we can change al