[Biojava-dev] The future of BioJava

Richard Holland holland at ebi.ac.uk
Mon Sep 24 07:42:34 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark - I'll use your comments as the basis of a list of things that are
broken and need fixing, which I mentioned over the weekend that I would
set up. This list will expand over time I'm sure.

> With generics I am interested to know what happens when you take an
> interface that requires List and change it to require List<Symbol>
> such as.
> 
> public void foo(List l);
> 
> to
> 
> public void foo(List <Symbol> l)
> 
> Due to erasure this may not break, old code would still run, however
> old code would probably no longer compile.

Old code would still compile and run just fine, with warnings at compile
time indicating that a genericised collection has been used without
specifying the generic type. However, you wouldn't be able to pass in a
List to a method which accepts a genericised List without casting it, as
that is a compile-time error. So your foo() example above would not work.

cheers,
Richard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG92pq4C5LeMEKA/QRAr4UAJ9FbCVFdE4enQrbFclNZx36RQaCBwCeM07d
E+oDZ3+smexvGFWAA0eHeFM=
=rFu5
-----END PGP SIGNATURE-----



More information about the biojava-dev mailing list