-
Notifications
You must be signed in to change notification settings - Fork 40
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
FileUtils can never throw an IOException #180
Comments
all inside FileUtils needs cleanup and move directly to NIO |
If the wrapper is thin, then I would even prefer to throw it away. |
Yes, it is just |
Yes, please deprecate all of this. It's a remnant of a time when the Java class library was much less powerful than it has been for the last ten years. If we were starting over, this wouldn't be needed. |
so with MSHARED-1032 implemented - this issue is no longer valid? |
Hi,
I did a quick check of
FileUtils::getFileAndDirectoryNames
Signature:
Source:
plexus-utils/src/main/java/org/codehaus/plexus/util/FileUtils.java
Lines 1833 to 1906 in 1f93cc8
It seems it can never throw an IOException.
If we removed it, a lot of Maven Mojos could be made MUCH simpler.
One of the reasons is that
canGenerateReport
is called both inexecute
andexecuteReport
. One throws aMojoExecutionException
, the other one aMavenReportException
, butcanGenerateReport
can throw neither. This means, that it is impossible to deal with IOExceptions in Maven Reports anyway.The text was updated successfully, but these errors were encountered: