Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#180] remove IOException from FileUtils signature #181

Closed
wants to merge 1 commit into from
Closed

[#180] remove IOException from FileUtils signature #181

wants to merge 1 commit into from

Conversation

bmarwell
Copy link

fixes #180

Sadly, this is a breaking change – make it a new major version (and add other similar changes, too!).

@olamy
Copy link
Member

olamy commented Jan 20, 2022

ditto that will break a lot of stuff

@bmarwell
Copy link
Author

Still think it's worth it. I adds so much noise to Mojos (especially reports) that this is a great fix.

@michael-o
Copy link
Member

Who is actually using PU outside of Codehaus or Maven space?

@gnodet
Copy link
Member

gnodet commented Jan 21, 2022

Who is actually using PU outside of Codehaus or Maven space?

I don't really think it matters. If it goes inside a major release, users will have to adjust, but the change makes sense to me.

@bmarwell
Copy link
Author

FWIW, those have to be reflected in maven-utils as well.

Who is actually using PU outside of Codehaus or Maven space?

I don't really think it matters. If it goes inside a major release, users will have to adjust, but the change makes sense to me.

in this case, I was using it for the taglist-maven-plugin. Someone was using it in canGenerateReport(). This method can neither throw a MojoExecutionException nor a MavenReportException, which is problematic:

mojohaus/taglist-maven-plugin@dac102d#diff-d78dd9fa5c0bfb4f18b93522e585ad3e35dc9eb0315763dd26e7ea7465d04764R466-R473

For this reason, I created yet another issue: https://issues.apache.org/jira/browse/MNG-7393

I do not think throwing a RuntimeException is particularly helpful here, though.

@michael-o
Copy link
Member

Question: When the code will move to NIO 2, will IOExceptions come back?

@bmarwell
Copy link
Author

Question: When the code will move to NIO 2, will IOExceptions come back?

Good point. Not at PC today, but from memory: yes, probably.

@michael-o
Copy link
Member

Question: When the code will move to NIO 2, will IOExceptions come back?

Good point. Not at PC today, but from memory: yes, probably.

If this evaluates to true, then this PR should be dropped.

@michael-o
Copy link
Member

@bmarwell Do you still want to hold onto this PR although I have a provided a reason not to?

@bmarwell
Copy link
Author

@michael-o Good question. I initially opened this issue because of how the maven report works. But we can deal with it later as well.

@bmarwell bmarwell closed this May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FileUtils can never throw an IOException
5 participants