[EMAIL PROTECTED] wrote:
Author: markt
Date: Mon Oct 30 19:51:44 2006
New Revision: 469360

URL: http://svn.apache.org/viewvc?view=rev&rev=469360
Log:
Fix bug 37458 where concurrent attempts to load the same class could set 
entry.manifest to null in one thread whilst the other thread(s) were operating 
under the assumption it was still non-null.
I had to add a largish sync block to do this (since the package sealing check also uses entry) but it 
is on <code>entry</code> rather than <code>this</code> so the impact should be 
minimal.
I also fixed a rare but possible IAE in the package definition section. Looking 
at the dev archive, at least one user has seen this problem so it isn't 
entirely theoretical.

Maybe it doesn't hurt much, but I'm not that happy about it anyway. Can I redo it a bit in 6.0 ?

For example, with a slightly bigger lock, entry.manifest cannot become a problem if it's null since the package will have always be defined in such a situation. Another solution is to not set manifest to null (after all, it's a single instance per JAR, and it barely uses any memory).

Rémy

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

Reply via email to