[concurrency-interest] ConcurrentHashmap.putIfAbsent oddities

Ernst, Matthias matthias.ernst at coremedia.com
Mon Dec 11 10:08:34 EST 2006


> ... && Arrays.equals(urls, other.urls);

I don't know if this is related to your problem but
comparing URLs has unpleasant side effects:

...
     * Two hosts are considered equivalent if both host names can be
resolved
     * into the same IP addresses; else if either host name can't be
     * resolved, the host names must be equal without regard to case; or
both
     * host names equal to null.<p>
     *
     * Since hosts comparison requires name resolution, this operation
is a
     * blocking operation. <p>
...

The one time I ran into this, it was not what I wanted.

Matthias

-- 
Matthias Ernst
Software Engineer
 
tel +49.40.32 55 87.503
fax +49.40.32 55 87.999
matthias.ernst at coremedia.com



More information about the Concurrency-interest mailing list