I'm working through the HashMap uses in HttpClient. CookieSpecRegistry.getSpecNames() uses a LinkedHashMap and the test TestCookiePolicy.testRegisterUnregisterCookieSpecFactory() currently assumes that the names will be returned in registration order, though the Javadoc is not clear on this.
Does the registration order really matter? If not, then one can use ConcurrentHashMap and do away with synch. I'm not sure if the following classes are intended to be used from multiple threads. If not, then there's little point using ConcurrentHashMap. AuthSchemeBase and subclasses AbstractCookieSpec and subclasses ConnPoolByRoute is not threadsafe currently, but is always called with a pool lock so using HashMap is OK. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
