Details
Description
Since Java 5, Java has introduced the java.util.concurrent API [1], which supports ReentrantReadWriteLock. But Castor has not used the java.util.concurrent API to improve the performance (Castor uses some code from EDU.oswego.cs.dl.util.concurrent library [2]). As far as I know [2], the EDU.oswego.cs.dl.util.concurrent is not developed and improved any more, and Java's java.util.concurrent package will include improved, more efficient, standardized versions of the main components in EDU.oswego.cs.dl.util.concurrent.
The Castor should be compiled on JDK 1.5 (or higher), because the Castor use the Generics. We should convert the Castor to use java.util.concurrent API (don't worry about the compatibility with JDK 1.4), and benefit from the java.util.concurrent package's improvement.
I have refactored the code in Castor, and prepare a patch for these (see attachment). I have run the 'mvn test' and it succeeded.
[1] http://jcp.org/en/jsr/detail?id=166
[2] http://g.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
Will review soon.