It looks like BasicHttpParams is not thread-safe.

Although it uses a HashMap (which is thread-safe) to store parameters,
the instance variable which holds it is not final or volatile, and
accesses to it are not synchronized.

If one thread calls setParameter() and creates the HashMap, there is
no guarantee that another thread will see the HashMap.

One solution would be to always create the HashMap (in the ctor or in
the variable defn).
This would mean some internal changes - e.g. clear() - but are there
any drawbacks to always creating the HashMap?

S///

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to