sebb wrote:
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?
I do not think it does.
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
AuthScheme and CookieSpec instances are not meant to be thread-safe.
They are instantiated on a per request / execution thread basis.
Primarily we should fix AuthSchemeRegistry, CookieSpecRegistry and
SchemeRegistry classes.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]