XenoAmess commented on a change in pull request #48:
URL: 
https://github.com/apache/maven-javadoc-plugin/pull/48#discussion_r443130579



##########
File path: src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java
##########
@@ -629,36 +650,31 @@ protected static String parseJavadocMemory( String memory 
)
             throw new IllegalArgumentException( "The memory could not be 
null." );
         }
 
-        Pattern p = Pattern.compile( "^\\s*(\\d+)\\s*?\\s*$" );
-        Matcher m = p.matcher( memory );
+        Matcher m = PARSE_JAVADOC_MEMORY_PATTERN_0.matcher( memory );
         if ( m.matches() )
         {
             return m.group( 1 ) + "m";
         }
 
-        p = Pattern.compile( "^\\s*(\\d+)\\s*k(b)?\\s*$", 
Pattern.CASE_INSENSITIVE );
-        m = p.matcher( memory );
+        m = PARSE_JAVADOC_MEMORY_PATTERN_1.matcher( memory );

Review comment:
       @elharo done.
   btw, this reusing is by original codes, and I don't like the reuse either.
   now fixed.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to