[ 
https://issues.apache.org/jira/browse/MJAVADOC-825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17903351#comment-17903351
 ] 

ASF GitHub Bot commented on MJAVADOC-825:
-----------------------------------------

pzygielo commented on code in PR #350:
URL: 
https://github.com/apache/maven-javadoc-plugin/pull/350#discussion_r1871298115


##########
src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java:
##########
@@ -534,11 +534,16 @@ protected static JavaVersion getJavadocVersion(File 
javadocExe)
      * @return the version of the javadoc for the output, only digits and dots
      * @throws PatternSyntaxException if the output doesn't match with the 
output pattern
      *             {@code (?s).*?[^a-zA-Z]([0-9]+\\.?[0-9]*)(\\.([0-9]+))?.*}.
-     * @throws IllegalArgumentException if the output is null
+     * @throws NullPointerException if the output is null
+     * @throws IllegalArgumentException if the output is empty
      */
     protected static String extractJavadocVersion(String output) throws 
IllegalArgumentException {

Review Comment:
   I see this:
   ```java
   protected static String extractJavadocVersion(String output) throws 
IllegalArgumentException {
   ```
   I'd like to see this instead:
   ```java
   protected static String extractJavadocVersion(String output) throws 
IllegalArgumentException, NullPointerException {
   ```
   or this:
   ```java
   protected static String extractJavadocVersion(String output) {
   ```





> Null values throw IllegalArgumentException instead of NullPointerException
> --------------------------------------------------------------------------
>
>                 Key: MJAVADOC-825
>                 URL: https://issues.apache.org/jira/browse/MJAVADOC-825
>             Project: Maven Javadoc Plugin
>          Issue Type: Bug
>            Reporter: Elliotte Rusty Harold
>            Assignee: Elliotte Rusty Harold
>            Priority: Minor
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to