commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colebourne <>
Subject Re: [io] 2.0 Moving to minimum of JDK 1.5
Date Wed, 06 Feb 2008 20:25:02 GMT
The following would be binary backwards incompatible:

> FileUtils
>  - public static void writeStringToFile(File file, CharSequence data,
> String encoding)
>    [note CharSequence version replaces String falvour]

> IOUtils
>  - public static InputStream toInputStream(CharSequence input)
>  - public static InputStream toInputStream(CharSequence input, String encoding)
>  - public static void write(CharSequence data, Writer output)
>  - public static void write(CharSequence data, OutputStream output)
>  - public static void write(CharSequence data, OutputStream output,
> String encoding)
> [Note CharSequence replaces String and/or StringBuffer flavours]

> So the changes are pretty minimal for IO - question is are these
> incompatible changes with generics being erased? If not then perhaps
> we can do this without breaking anything.

All the other changes are binary compatible. Except for the problem that 
the bytecode format for Java 5 is different as well, so you'd need 
retrotranslator to help you out as well.

In addition to the changes above, you will probably want to change most 
APIs that take in a Collection to take an Iterable instead.

We should probably remove all references to arrays in the public API, as 
generics and arrays work badly together, and I would strongly recommend 
treating arrays as a type not to be exposed on any public API post-Java5.

Both these changes would be backwards incompatible.

Finally, we should look to see if we can use the Appendable interface in 
any of our APIs. This may also result in incompatible changes.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message