[jira] [Commented] (IO-624) IOUtils.writeLines updating incompatible issue

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (IO-624) IOUtils.writeLines updating incompatible issue

David Mollitor (Jira)

    [ https://issues.apache.org/jira/browse/IO-624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16928629#comment-16928629 ]

Gary Gregory commented on IO-624:
---------------------------------

Hello,

If you replace the commons-io jar file with the new one and run your app, all is well. If you recompile your source, you must adapt.

> IOUtils.writeLines updating incompatible issue
> ----------------------------------------------
>
>                 Key: IO-624
>                 URL: https://issues.apache.org/jira/browse/IO-624
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.6
>            Reporter: xia0c
>            Priority: Major
>
> Hi,
> The following code snippets throw an incompatible issue when I try to rolling update Commons-io from 2.2 to 2.6.
> {code:java}
> @Test
> public void test() throws IOException{
>
> File TestFile = new File( "test.txt" );
> OutputStream out = null;
> List<String> lines = Arrays.asList("a","b","c");
>     try {
>         out = new FileOutputStream(TestFile, true);
>         IOUtils.writeLines(lines, null, out, null);
>     } finally {
>         IOUtils.closeQuietly(out);
>     }
> {code}
> It throws an error:
> {code:java}
> error: reference to writeLines is ambiguous
> {code}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)