commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: [io] LockableFileWriter.close() ignores exceptional return value of java.io.File.delete()
Date Wed, 07 Sep 2011 13:24:45 GMT
On Wed, Sep 7, 2011 at 8:45 AM, sebb <sebbaz@gmail.com> wrote:

> On 7 September 2011 13:26, Gary Gregory <garydgregory@gmail.com> wrote:
> > Should LockableFileWriter.close() be changed from:
> >
> >    public void close() throws IOException {
> >        try {
> >            out.close();
> >        } finally {
> >            lockFile.delete();
> >        }
> >
> > to:
> >
> >    public boolean close() throws IOException {
> >        try {
> >            out.close();
> >        } finally {
> >            return lockFile.delete();
> >        }
> >
> > ?
>
> That will break binary compatibility - the return type is part of the
> method signature.
>
> So no, unless the method is new.
>
> There's an IO JIRA about this somewhere.
>

You must be thinking of https://issues.apache.org/jira/browse/IO-216

The question becomes: should the change I suggest be slated for 3.0 (I
assume that 3.0 would be for a binary incompatible release)?

Gary



>
> > Gary
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > JUnit in Action, 2nd Ed: http://s.apache.org/rl
> > Spring Batch in Action: http://s.apache.org/HOq
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: http://s.apache.org/rl
Spring Batch in Action: http://s.apache.org/HOq
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message