+1, you probably never be sure that an exception is not thrown. Good protective style.
-----Original Message-----
From: Mark Womack [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 24 June 2003 2:16 PM
To: Log4J Developers List
Subject: ReadWriterLock usage

I was looking at the usage of the ReadWriterLock class the Category code as an example for my similar modification to the PluginRegistry.
 
Shouldn't all the releaseWriteLock() and releaseReadLock() calls be contained in finally blocks?  Unless we are absolutely sure that an exception cannot be thrown in that code, it seems like a good defensive coding style.  Otherwise the lock counts could get out of whack at some point.
 
?
-Mark

Reply via email to