[concurrency-interest] ReentrantReadWriteLock backport non-matching signature

Moran Avigdor moran at gigaspaces.com
Sun Jul 9 09:15:14 EDT 2006


In java.util.concurrent.locks.ReentrantReadWriteLock readLock() and 
writeLock() return Locks as follows:

    public ReentrantReadWriteLock.WriteLock writeLock() { return 
writerLock; }
    public ReentrantReadWriteLock.ReadLock  readLock()  { return 
readerLock; }

While, in 
edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantReadWriteLock 
these are defined:

    public Lock writeLock() { return writerLock_; }
    public Lock readLock()  { return readerLock_; }

Although ReentrantReadWriteLock.ReadLock/WriteLock are Lock-s this 
incompatibility in signatures causes
problems when using Retrotranslator.

Any comments?






More information about the Concurrency-interest mailing list