You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Kev Jackson <fo...@gmail.com> on 2007/11/13 10:34:29 UTC

[Fwd: RE: svn commit: r594009 - /ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/TempFile.java]

Hi all,

Some lurker ;) spotted this commit and got in touch with me.

I copied over the code from the svn trunk version without looking too 
carefully (my bad), unless anyone can tell me that this is correct, I 
agree that at least semantically it's utter crap :)

I think I should modify both the svn trunk and 1.7 branch to:

public void setCreateFile(boolean createFile) {
         this.createFile = createFile;
}

Thoughts?

Kev


 >>>

Hi Kev,

You don't know me; I subscribe to the various ant lists (ant-user,
ant-dev, ant-cvs). I saw the below check-in and it just struck me as
wrong (I don't think createFile should be set to the value of
deleteOnExit); given that you're trying to get an alpha out, I thought
I'd bring it to your attention. If it's correct, then please forgive the
intrusion.

Rick

> From: kevj@apache.org [mailto:kevj@apache.org] 
> Sent: Sunday, November 11, 2007 6:41 PM
> To: ant-cvs@apache.org
> Subject: svn commit: r594009 - 
> /ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant
> /taskdefs/TempFile.java

[snipped]

> URL: 
>
http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/or
g/apache/tools/ant/taskdefs/TempFile.java?rev=594009&r1=594008&r2=594009
&view=diff
>
========================================================================
======

[snipped]

> @@ -123,6 +126,22 @@
>      public boolean isDeleteOnExit() {
>          return deleteOnExit;
>      }
> +    
> +    /**
> +     * If set the file is actually created, if not just a 
> name is created.
> +     * @param createFile boolean flag.
> +     */
> +    public void setCreateFile(boolean createFile) {
> +        this.createFile = deleteOnExit;
> +    }
> +
> +    /**
> +     * Learn whether createFile flag is set for this tempfile task.
> +     * @return the createFile flag.
> +     */
> +    public boolean isCreateFile() {
> +        return createFile;
> +    }
>  
>      /**
>       * Creates the temporary file.
--
Rick Genter
Principal Software Engineer
Silverlink Communications
rgenter@silverlink.com
www.silverlink.com
Office (781) 425-5763
Mobile (781) 771-9677


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


Re: [Fwd: RE: svn commit: r594009 - /ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/TempFile.java]

Posted by Peter Reilly <pe...@gmail.com>.
On Nov 13, 2007 9:34 AM, Kev Jackson <fo...@gmail.com> wrote:
> Hi all,
>
> Some lurker ;) spotted this commit and got in touch with me.
>
> I copied over the code from the svn trunk version without looking too
> carefully (my bad), unless anyone can tell me that this is correct, I
> agree that at least semantically it's utter crap :)
>
> I think I should modify both the svn trunk and 1.7 branch to:
>
> public void setCreateFile(boolean createFile) {
>          this.createFile = createFile;
> }
>
> Thoughts?
Yes,
  the original code is a bug.

Peter

>
> Kev
>
>
>  >>>
>
> Hi Kev,
>
> You don't know me; I subscribe to the various ant lists (ant-user,
> ant-dev, ant-cvs). I saw the below check-in and it just struck me as
> wrong (I don't think createFile should be set to the value of
> deleteOnExit); given that you're trying to get an alpha out, I thought
> I'd bring it to your attention. If it's correct, then please forgive the
> intrusion.
>
> Rick
>
> > From: kevj@apache.org [mailto:kevj@apache.org]
> > Sent: Sunday, November 11, 2007 6:41 PM
> > To: ant-cvs@apache.org
> > Subject: svn commit: r594009 -
> > /ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant
> > /taskdefs/TempFile.java
>
> [snipped]
>
> > URL:
> >
> http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/or
> g/apache/tools/ant/taskdefs/TempFile.java?rev=594009&r1=594008&r2=594009
> &view=diff
> >
> ========================================================================
> ======
>
> [snipped]
>
> > @@ -123,6 +126,22 @@
> >      public boolean isDeleteOnExit() {
> >          return deleteOnExit;
> >      }
> > +
> > +    /**
> > +     * If set the file is actually created, if not just a
> > name is created.
> > +     * @param createFile boolean flag.
> > +     */
> > +    public void setCreateFile(boolean createFile) {
> > +        this.createFile = deleteOnExit;
> > +    }
> > +
> > +    /**
> > +     * Learn whether createFile flag is set for this tempfile task.
> > +     * @return the createFile flag.
> > +     */
> > +    public boolean isCreateFile() {
> > +        return createFile;
> > +    }
> >
> >      /**
> >       * Creates the temporary file.
> --
> Rick Genter
> Principal Software Engineer
> Silverlink Communications
> rgenter@silverlink.com
> www.silverlink.com
> Office (781) 425-5763
> Mobile (781) 771-9677
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>

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