You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alex Herbert (Jira)" <ji...@apache.org> on 2023/06/01 13:32:00 UTC

[jira] [Commented] (IO-797) IOUtils.readLines source compatibility change

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

Alex Herbert commented on IO-797:
---------------------------------

Note: Special handling added by the caller for the checked exception will now be skipped. The update of the library forces a recompile of caller code to re-enable any special handling in catch blocks.

This issue is flagged by RevAPI as binary compatible but not source compatible:

[java.method.exception.checkedRemoved|https://revapi.org/revapi-java/0.28.1/differences.html#java.method.exception.checkedRemoved]

> IOUtils.readLines source compatibility change
> ---------------------------------------------
>
>                 Key: IO-797
>                 URL: https://issues.apache.org/jira/browse/IO-797
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.12.0
>            Reporter: Dave Moten
>            Priority: Minor
>
> org.apache.commons.io.IOUtils.readLines no longer throws IOException as of 2.12.0 but rather throws an UncheckedIOException. 
> This is a breaking change in that wrapping such a call with try catch (IOException e) now attracts a compile error because the method no longer throws IOException.
> I'm unaware if this is a routine thing for this library, I would hope not. I can fix my code but I expected this sort of change only to be made with a major version number bump.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)