From 2902d0de6db6957a971eea39317ca745025ac161 Mon Sep 17 00:00:00 2001 From: Henning Schmiedehausen Date: Fri, 8 Sep 2023 13:52:45 -0700 Subject: [PATCH] [MJAVADOC-758] correct exception in JavadocUtil (#230) Throw NPE, not IOException --- .../java/org/apache/maven/plugins/javadoc/JavadocUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java b/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java index 4e4e2c67..db7ef042 100644 --- a/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java +++ b/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java @@ -692,10 +692,10 @@ protected static List getTagletClassNames(File jarFile) */ protected static void copyResource(URL url, File file) throws IOException { if (file == null) { - throw new IOException("The file can't be null."); + throw new NullPointerException("The file can't be null."); } if (url == null) { - throw new IOException("The url could not be null."); + throw new NullPointerException("The url could not be null."); } FileUtils.copyURLToFile(url, file);