Skip to content

Commit

Permalink
Remove exception not thrown from private method signature
Browse files Browse the repository at this point in the history
FileUtils.requireDirectoryIfExists(File, String)
  • Loading branch information
garydgregory committed Jun 6, 2024
1 parent a0c1482 commit 6bace53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/apache/commons/io/FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -2812,7 +2812,7 @@ private static void requireDirectoryExists(final File directory, final String na
* @throws NullPointerException if the given {@link File} is {@code null}.
* @throws IllegalArgumentException if the given {@link File} exists but is not a directory.
*/
private static void requireDirectoryIfExists(final File directory, final String name) throws FileNotFoundException {
private static void requireDirectoryIfExists(final File directory, final String name) {
Objects.requireNonNull(directory, name);
if (directory.exists() && !directory.isDirectory()) {
throw new IllegalArgumentException("Parameter '" + name + "' is not a directory: '" + directory + "'");
Expand Down

0 comments on commit 6bace53

Please sign in to comment.