On Apr 28, 2014, at 12:30 PM, Peter Levart <[email protected]> wrote:
> You could use the null return from Map.merge() as a signal to throw NPE, but
> this is only 100% safe in to*Map() methods that don't take a mapSupplier.
>
> Collections.toConcurrentMap(...., Supplier<M> mapSupplier) could be abused by
> someone knowing that the supplier is called exactly once and that the
> returned map is the same instance returned from the supplier. For example:
>
I don't think we should concern ourselves with such abuses :-)
* @param mapSupplier a function which returns a new, empty {@code Map} into
* which the results will be inserted
Paul.