A
Arne Vajhøj
Lew said:I just got bitten by a Java 6 change that broke existing code.
We have a bunch of things that rely on a library that has classes that
implement java.sql.Statement.
<http://java.sun.com/javase/6/docs/api/java/sql/Statement.html>
The library is compliant with Java 5. We compile it from source. The
interface has methods that were added in Java 6, so the code doesn't
compile under Java 6.
It is not quite the same problem.
But it is unfortunately a real problem.
It will happen when interfaces get stuff added.
I guess the official solution is that a JDBC n.m compliant
JDBC driver must be compiled with a Java version at that
JDBC version and just run on the newest Java version.
But that is highly problematic in real world development
environments.
The alternative would be pretty ugly though:
public interface Statement40 extends Statement30
public interface Statement30 extends Statement20
public interface Statement20 extends Statement
Arne