You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "elharo (via GitHub)" <gi...@apache.org> on 2023/09/26 12:03:45 UTC

[GitHub] [maven-plugin-tools] elharo commented on a diff in pull request #227: [MNG-7416] Simplify Boolean expressions and returns

elharo commented on code in PR #227:
URL: https://github.com/apache/maven-plugin-tools/pull/227#discussion_r1337100795


##########
maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/javadoc/JavaJavadocMojoDescriptorExtractor.java:
##########
@@ -510,7 +510,7 @@ private Map<String, JavaField> extractFieldParameterTags(JavaClass javaClass) {
         if (superClass != null) {
             rawParams = extractFieldParameterTags(superClass);
         } else {
-            rawParams = new TreeMap<String, JavaField>();
+            rawParams = new TreeMap<>();

Review Comment:
   Looking at this one, I realize the diamond operator with no params is more useful for the case where it's declared on the same line. 
   
   TreeMap<String, JavaField> rawParams = new TreeMap<String, JavaField>();
   
   does seem redundant
   
   rawParams = new TreeMap<String, JavaField>();
   
   is not. Haven't noticed that before.



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org