Several issues with

Pavel Rappo pavel.rappo at
Mon Nov 17 23:27:15 UTC 2014

Hi everyone,

I've been working with the URLConnection class for some time now and have noticed several interesting things.

1. Unsafe publication of static field (it looks very similar to [1])
2. Benign race condition in on static field
3. Handlers produced by factory are not cached in the handlers field (I don't know whether it was done deliberately or not, but I couldn't find any explanation on it in the javadoc. Moreover the behaviour of the factory in the URL class is different. It caches whatever is produced by the factory there).

So which of these do you think are real issues worth fixing?

[1] The same thing was noticed by Peter Levart here:


More information about the core-libs-dev mailing list