ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: <propertyfile> bug
Date Tue, 19 Feb 2002 03:02:53 GMT
----- Original Message -----
From: "Diane Holt" <holtdl@yahoo.com>
> --- Erik Hatcher <jakarta-ant@ehatchersolutions.com> wrote:
> > I had touched this module a while back because the default values were
> > not working properly so I was afraid I might have broken it.
>
> Well, we both kind of did :)  You did with your big change, and me with my
> little one.

I'm not sure if my previous patch broke it worse or just left something
broken while fixing the default value stuff.

> Yep -- did it a little too quick, and didn't see that a value to add or
> subtract could even be specified (thought it was always just inc/dec by
> 1).
>
> Basically, the problem was that, if a value was in fact specified and
> there was an old value as well, then you've got another number to deal
> with that you weren't taking into account (ie., assigning the old value to
> an int, so it could be added to value, and actually adding it). IOW: You
> can't just say 'newValue += value', because there's no addition to value
> of oldValue that way.
>
> Anyway, I've put through another fix, and hopefully, this one will fix it
> for real.

Also a little too quick on this patch too.... you're missing that there are
two other formats that need to be taken into account (String and Date) that
all have similar logic.  I'm refactoring now to at least pull the confusing
logic out into a single method that all three types use.  I'll be
superseding your change either tonight or tomorrow.

Why no test cases for this?  I don't want to be too much of a stickler since
it is a lot of work, but adding more and more test cases makes our
reliability that much better. We should probably at least write test cases
to identify known bugs while we are fixing them, especially for something
like <propertyfile> which is easily testable.

    Erik



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message