commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: svn commit: r1326609 - in /commons/proper/io/trunk/src: changes/changes.xml main/java/org/apache/commons/io/FileUtils.java
Date Wed, 18 Apr 2012 13:59:56 GMT
On Wed, Apr 18, 2012 at 9:34 AM, Jörg Schaible
<Joerg.Schaible@scalaris.com>wrote:

> Gary Gregory wrote:
>
> > On Wed, Apr 18, 2012 at 12:38 AM, Stefan Bodewig <bodewig@apache.org>
> > wrote:
> >
> >> On 2012-04-16, <ggregory@apache.org> wrote:
> >>
> >> > [IO-324] Add Charset sister APIs to method that take a String charset
> >> name.
> >>
> >> The new methods cause problems for people who pass in null for the
> >> charset as they want the platform's system default.  The compiler
> >> doesn't know which of the writeStringToFile methods to pick if the third
> >> param is null.
> >>
> >
> > You are correct. See the release notes:
> >
> > Compatibility with 2.2 and 1.4:
> > Binary compatible: Yes.
> > Source compatible: No, see the rare case in
> > https://issues.apache.org/jira/browse/IO-318.
> > Semantic compatible: No, see the rare case in
> > https://issues.apache.org/jira/browse/IO-318.
> >
> > There are two solutions if you want to use the latest [io], as noted in
> > the Jira:
> >
> > - type-cast the charset to String to Charset, or
> > - use the API that does not have a charset.
>
> We could add a writeStringToFile() method without parameter. No need for a
> null value, no need for the cast.
>

The API is already there :)

Gary

>
> - Jörg
>
>
> ---------------------------------------------------------------------
> 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://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
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