This sounded too simple, and this is because I was wrong. Building
with JDK 1.5 and setting compiler level to 1.4 correctly reports a
problem with this code:
List<String> list = new ArrayList<String>();
but not this code:
StringBuilder b = new StringBuilder();
So I had to introduce "test-1_4" build target to the main build file.
Its main purpose is to allow nightly build script to do an extra
regression pass using JDK 1.4, detecting bad code, before creating a
final build with JDK 1.5. But of course this target can be used in
development as well.
Andrus
On Nov 4, 2005, at 8:01 PM, Andrus Adamchik wrote:
> This is controlled by "source" and "target" parameters of "javac"
> Ant task. I have two Ant macros under cayenne-ant/import/ant-
> macros.xml to compile corresponding folders into 1.4 and 1.5 forms.
> So compatibility is guaranteed by the compiler, even if there is a
> chance of a developer messing up and checking in the wrong code
> version.
>
> Andrus
>
>
> On Nov 4, 2005, at 7:52 PM, Mike Kienenberger wrote:
>
>> Hopefully this is going to compile into 1.4 runtime compatible code
>> because I don't have the option of upgrading the app servers to 1.5.
>> I'm locked into 1.4.2 for a long time to come.
This archive was generated by hypermail 2.0.0 : Sat Nov 05 2005 - 08:11:38 EST