Hi Everyone,
I took an action item to evaluate whether adding generics to SDO 3
interfaces would require a recompile of applications that use SDO 2.1
interfaces.
To evaluate this, I wrote a small library and compiled it using Java
1.4.19. The code looks like
public
class Lib {
public List getStrings() {
List ret = new ArrayList();
ret.add("nonGeneric");
return ret;
}
}
I then wrote a client program that uses the lib, also compiled against Java
1.4
public List getStrings()
{
List ret = new ArrayList();
ret.add("nonGeneric");
return ret;
}
Running the client with the library on the classpath produces the expected
result (printing out "nonGeneric").
I then compiled the following code using Java 6
public List<String>
getStrings() {
return Collections.singletonList("Hello");
}
Modifying the classpath to include the Java 6 version instead of the Java
1.4 version of the library printed out "Hello", as expected.
I also tried some variations, eg, using interfaces, without noticing any
problems.
From this, I conclude that adding generics to our interfaces will not
require recompilation of code.
Best Regards,
Ron