#5 ReentrantReadWriteLock backport non-matching signature

closed-fixed
nobody
None
5
2006-07-10
2006-07-09
Guy Korland
No

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.

I am getting this message when verbose is true

[retrotranslator] Method not found:
edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock
edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantReadWriteLock.readLock()
[retrotranslator] Method not found:
edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock
edu.emory.mathcs.backport.java.util.concurrent.locks.ReentrantReadWriteLock.writeLock()

using latest version: 1.0.7

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Note:

    I had to replace all places using

    private ReentrantReadWriteLock rwl = new
    ReentrantReadWriteLock();

    to
    private ReadWriteLock rwl = new ReentrantReadWriteLock();

    Since ReadWriteLock.readLock() returns Lock and not like
    ReentrantReadWriteLock.readLock (that returns ReadLock)
    the conversion to 1.4 now works.

     
  • Taras Puchko

    Taras Puchko - 2006-07-10

    Logged In: YES
    user_id=1384557

    Fixed sources is in CVS now.

     
  • Taras Puchko

    Taras Puchko - 2006-07-10
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks