FileUtils can never throw an IOException
Hi,
I did a quick check of FileUtils::getFileAndDirectoryNames
Signature:
public static List<String> getFileAndDirectoryNames( File directory, String includes, String excludes,
boolean includeBasedir, boolean isCaseSensitive,
boolean getFiles, boolean getDirectories )
throws IOException;
Source: https://github.com/codehaus-plexus/plexus-utils/blob/1f93cc8583f872b7bc01bef1dc32979f0a2335bb/src/main/java/org/codehaus/plexus/util/FileUtils.java#L1833-L1906
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 in execute and executeReport. One throws a MojoExecutionException, the other one a MavenReportException, but canGenerateReport can throw neither. This means, that it is impossible to deal with IOExceptions in Maven Reports anyway.
all inside FileUtils needs cleanup and move directly to NIO
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 Files.walk essentially.
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.
https://issues.apache.org/jira/browse/MSHARED-1032
so with MSHARED-1032 implemented - this issue is no longer valid?