----- Original Message -----
From: "Jay Glanville" <[EMAIL PROTECTED]>
To: "Ant-Dev (text)" <[EMAIL PROTECTED]>
Sent: Friday, October 06, 2000 6:51 PM
Subject: Possible bug in code??
> Please excuse my ignorance, but I have a question about the Path class.
>
> There is a two-parameter constructor that goes like this:
> public Path(Project p, String path)
> this(p);
> createPathElement().setPath(path);
> }
> and there is a method called setPath that goes like this:
> public void setPath(String path) throws BuildException {
> if (isReference()) {
> throw tooManyAttributes();
> }
> createPathElement().setPath(path);
> }
>
> My question is this: if someone uses the two-parameter constructor, then
> createPathElement() will be called twice. Is this the desired action? It
> appears to my naive eye that the path would be added twice.
>
Hmm. I don't think so if I understand you correctly. setPath is called on
the return-value of createPathElement() (which is an instance of the nested
class PathElement).
Nico