logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Smith <Paul.Sm...@lawlex.com.au>
Subject RE: ReadWriterLock usage
Date Tue, 24 Jun 2003 04:15:11 GMT
+1, you probably never be sure that an exception is not thrown. Good
protective style.

-----Original Message-----
From: Mark Womack [mailto:mwomack@apache.org]
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

View raw message