This is an automated email from the ASF dual-hosted git repository. henning pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git
The following commit(s) were added to refs/heads/master by this push: new 2902d0de [MJAVADOC-758] correct exception in JavadocUtil (#230) 2902d0de is described below commit 2902d0de6db6957a971eea39317ca745025ac161 Author: Henning Schmiedehausen <henn...@schmiedehausen.org> AuthorDate: Fri Sep 8 13:52:45 2023 -0700 [MJAVADOC-758] correct exception in JavadocUtil (#230) Throw NPE, not IOException --- src/main/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 @@ public class JavadocUtil { */ 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);