ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Vernum <Tim.Ver...@macquarie.com.au>
Subject RE: [PATCH] comma separated PVCS projects
Date Fri, 20 Apr 2001 05:38:46 GMT
From: Conor MacNeill [mailto:conor@cortexebusiness.com.au]

> > Your "add" method cannot take a string argument.
> > I'm not sure why that is, but the IntrospectionHelper has this code:
> 
> Think about this a little and I think you'll see why this 
> restriction makes
> some sense.

Hey, no one said that thinking was going to be required here!

> strings are
> immutable and once created can't be configured.

Umm.. yeah.
But, strings aren't special in that regard.
There are other classes in a similar position.

What it amounts to is that an addXXX method that takes
a string arg is silently ignore, because IntrospectionHelper
knows enough about strings to know they can't be used.
But I'm slightly of the opinion that IntH is being too smart,
and is obviously confusing some people.

If the check wasn't there, you'd just end up with something
like:
	java.land.String does not support nested text elements
which is probably more useful than skipping the addXXX method.

> >   2) Create a class "PvcsProject" that has a string contructor.
> 
> I think you actually want to have an addText method for that. The
> constructor approach is more for attribute style setXXX methods.

Probably.

Mime
View raw message