[concurrency-interest] ReentrantReadWriteLock backport non-matching signatures

Moran Avigdor moran at gigaspaces.com
Sun Jul 9 10:16:36 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?

-- 
Moran



More information about the Concurrency-interest mailing list