elharo commented on a change in pull request #48:
URL:
https://github.com/apache/maven-javadoc-plugin/pull/48#discussion_r443121454
##########
File path:
src/main/java/org/apache/maven/plugins/javadoc/AbstractFixJavadocMojo.java
##########
@@ -856,6 +831,23 @@ private void parseClirrTextOutputFile( File
clirrTextOutputFile )
}
}
+ private void methodAdded( String[] split )
+ {
+ String[] splits2;
+ List<String> list = clirrNewMethods.get( split[2].trim() );
+ if ( list == null )
+ {
+ list = new ArrayList<>();
+ }
+ splits2 = StringUtils.split( split[3].trim(), "'" );
Review comment:
initialize this here
##########
File path:
src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java
##########
@@ -22,10 +22,7 @@
import java.io.File;
import java.io.IOException;
import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
+import java.util.*;
Review comment:
I'm not sure if apache maven has a style rule about this or not, but I
know at Google we don't use wildcard imports.
##########
File path: src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java
##########
@@ -629,35 +650,34 @@ protected static String parseJavadocMemory( String memory
)
throw new IllegalArgumentException( "The memory could not be
null." );
}
- Pattern p = Pattern.compile( "^\\s*(\\d+)\\s*?\\s*$" );
+ Pattern p = PARSE_JAVADOC_MEMORY_PATTERN_0;
Matcher m = p.matcher( memory );
if ( m.matches() )
{
return m.group( 1 ) + "m";
}
-
- p = Pattern.compile( "^\\s*(\\d+)\\s*k(b)?\\s*$",
Pattern.CASE_INSENSITIVE );
+ p = PARSE_JAVADOC_MEMORY_PATTERN_1;
m = p.matcher( memory );
if ( m.matches() )
{
return m.group( 1 ) + "k";
}
- p = Pattern.compile( "^\\s*(\\d+)\\s*m(b)?\\s*$",
Pattern.CASE_INSENSITIVE );
+ p = PARSE_JAVADOC_MEMORY_PATTERN_2;
Review comment:
can you just use the constants here rather than assigning and reusing a
local variable?
----------------------------------------------------------------
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]