[Biojava-dev] SimpleThreadPool priority change

Thomas Down td2@sanger.ac.uk
Tue, 19 Nov 2002 12:40:08 +0000


On Tue, Nov 19, 2002 at 10:36:13AM +0000, Keith James wrote:
> 
> compile:
>     [javac] Compiling 913 source files to /nfs/team81/kdj/devel/biojava-live/ant-build/classes/main
>     [javac] /nfs/team81/kdj/devel/biojava-live/ant-build/src/main/org/biojava/bio/seq/SubSequence.java:352: getParent(org.biojava.bio.seq.Feature) is inherited from org.biojava.bio.seq.ProjectedFeatureHolder and hides method in outer class org.biojava.bio.seq.SubSequence.  An explicit 'this' qualifier must be used to select the desired instance.
>     [javac]                  return(ssthis.new SSRemoteFeature(ssthis, this, getParent(f), rft, f));
>     [javac]                                                                  ^
>     [javac] Note: Some input files use or override a deprecated API.
>     [javac] Note: Recompile with -deprecation for details.
>     [javac] 1 error

Okay, this one turned out to be nastier than I originally though.
Javac 1.3.1 genuinely seemed to think that two methods called
getParent were ambiguous between a nested class and it's enclosing
class, even though:

    - It's an instance method on the enclosing class, but the
      nested class is static (and thus doesn't have an enclosing
      instance).

    - The methods have different signatures.

Wibble.

I've fixed this by renaming the (previously rather unhelpfully-named)
SubSequence.getParent() as SubSequence.getSequence().  I don't know
of any external code which was using this method.  If it affects you,
shout now and I'll try to find another solution.

The original version worked fine with JDK1.4.1 -- I'm just going
to put this down as a compiler bug.  But we do still seem to have
people using 1.3...

     Thomas.