ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <>
Subject Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/types Preferred
Date Wed, 02 Jan 2002 14:33:29 GMT

On Wed, 26 Dec 2001 Steve Loughran wrote :

I got this message just now and hence the delayed reply.

> After you suggested it, I was debating doing this when 
> I went round tidying
> up some tasks. I dont think I would have done it as 
> cleanly or completely as
> you did, so I am grateful.

I didn't wish to hamper what you were doing as the
naming police.  That is why I had committed the new
datatypes and did not change the setter names, assuming
you would be taking care of that.

> 1. I had debated whether to have a constructor which 
> would validate and
> throw an exception, so SrcFile() could have 2 ctors; 
> empty,File and string.

I am not a big fan of having multiple constructors
because constructors have limitations compared to 
'normal' methods in the sense we cannot mark it final,

> The problem with this approach is that if someone 
> subclassed SrcFile and
> overrode isValid, then it could be called from a 
> parent constructor, which is always a bad thing.

Guess you didn't notice, but I had marked SrcFile as 
a final class, to prevent subclassing.  IIRC, I had
also marked isValid as final.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message