adangel commented on code in PR #788:
URL: https://github.com/apache/maven-pmd-plugin/pull/788#discussion_r4630474162


##########
src/main/java/org/apache/maven/plugins/pmd/PmdReport.java:
##########
@@ -626,10 +641,32 @@ private boolean emptyOrNotExisting(String entry) {
         return false;
     }
 
+    /**
+     * @return the explicit {@code targetJdk}, else {@code 
maven.compiler.release}, else {@code maven.compiler.source}
+     */
+    String getTargetJdk() {

Review Comment:
   Can be private, it's only used internally:
   
   
   ```suggestion
       private String getTargetJdk() {
   ```



##########
src/main/java/org/apache/maven/plugins/pmd/PmdReport.java:
##########
@@ -83,10 +83,25 @@ public class PmdReport extends AbstractPmdReport {
      * <p>
      *   <b>Note:</b> this parameter is only used if the language parameter is 
set to <code>java</code>.
      * </p>
+     * <p>If not set, the value of {@code maven.compiler.release} is used, or 
{@code maven.compiler.source} when no
+     * release is set, as the Maven Compiler Plugin does.</p>
      */
-    @Parameter(property = "targetJdk", defaultValue = 
"${maven.compiler.source}")
+    @Parameter(property = "targetJdk")
     private String targetJdk;
 
+    /**
+     * The {@code maven.compiler.release} property, used when {@link 
#targetJdk} is not set.
+     */
+    @Parameter(defaultValue = "${maven.compiler.release}", readonly = true)

Review Comment:
   For my understanding (no change needed): this parameter is only used for 
injection, and because it’s readonly it’s excluded from the generated pmd:pmd 
docs - right?



-- 
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: [email protected]

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

Reply via email to