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

xia0c commented on IO-624:
--------------------------

Hi Yuji,

 

Thanks for your solution. After changing my code, it works. But, is this a 
necessary API change for IOUtils.writeLines? Because it may affect a lot of 
client code like me when we try to rolling upgrade the library. 

> 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)

Reply via email to