ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject RE: [PATCH] - to detect JDK versions
Date Mon, 24 Jul 2000 14:11:57 GMT

> Conor,
> First off, you're right. I'm not sure what I was going, but that
> code is totally
> whacked! About using int arithmatic though...Are we guaranteed
> that each minor
> version number will contain no leading zeros? If we are, then
> I'll implement it
> with ints.  Otherwise I'll do as you suggest but parse each
> major/minor version
> number to a double so I can deal with leading zeros
> appropriately. Consider the
> (hypothetical) case:
> 	1.4.1
> 	1.4.02
> 1.4.1 should come first, but 02 will parseInt to 2 and make
> 1.4.02 greater.

As far as I can tell, Sun's practice to date (e.g. 1.1.6) has been not to
use .02 style numbers. Therefore I would prefer not to use doubles and
complicate things for a situation which, at least today, does not exist.
When it happens, we should deal with it then. Perhaps I just have an
aversion for using doubles for things which should be exact. :-)

View raw message