This is an automated email from the ASF dual-hosted git repository.

mbuenger pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 96a03bc  Fix Javadoc issues per Oracle conventions (#685)
96a03bc is described below

commit 96a03bcbbe41db04c5c432832f893849168b9ad3
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Thu Jan 1 17:04:37 2026 +0000

    Fix Javadoc issues per Oracle conventions (#685)
---
 .../apache/maven/plugins/pmd/AbstractPmdReport.java  |  8 +++++---
 .../plugins/pmd/AbstractPmdViolationCheckMojo.java   | 20 ++++++++++----------
 .../maven/plugins/pmd/ConfigurationService.java      |  2 +-
 .../java/org/apache/maven/plugins/pmd/CpdReport.java | 16 ++++++++++------
 .../apache/maven/plugins/pmd/CpdReportRenderer.java  |  4 ++--
 .../plugins/pmd/ExcludeDuplicationsFromFile.java     |  2 +-
 .../apache/maven/plugins/pmd/ExcludeFromFile.java    |  5 +++--
 .../maven/plugins/pmd/ExcludeViolationsFromFile.java |  2 +-
 .../java/org/apache/maven/plugins/pmd/PmdReport.java | 20 ++++++++++++--------
 .../apache/maven/plugins/pmd/PmdReportRenderer.java  |  8 +++++---
 .../apache/maven/plugins/pmd/ViolationDetails.java   |  2 +-
 .../apache/maven/plugins/pmd/exec/CpdExecutor.java   |  2 +-
 .../apache/maven/plugins/pmd/exec/PmdExecutor.java   |  3 ++-
 13 files changed, 54 insertions(+), 40 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdReport.java 
b/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdReport.java
index 2824115..53c9783 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdReport.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdReport.java
@@ -115,6 +115,7 @@ public abstract class AbstractPmdReport extends 
AbstractMavenReport {
     /**
      * Specifies the location of the source directories to be used for PMD.
      * Defaults to <code>project.compileSourceRoots</code>.
+     *
      * @since 3.7
      */
     @Parameter(defaultValue = "${project.compileSourceRoots}")
@@ -123,6 +124,7 @@ public abstract class AbstractPmdReport extends 
AbstractMavenReport {
     /**
      * The directories containing the test-sources to be used for PMD.
      * Defaults to <code>project.testCompileSourceRoots</code>
+     *
      * @since 3.7
      */
     @Parameter(defaultValue = "${project.testCompileSourceRoots}")
@@ -238,7 +240,7 @@ public abstract class AbstractPmdReport extends 
AbstractMavenReport {
      *    }
      * </pre>
      *
-     * <strong>note:</strong> requires at least Maven 3.3.1
+     * <strong>note:</strong> requires at least Maven 3.3.1.
      *
      * @since 3.14.0
      */
@@ -390,7 +392,7 @@ public abstract class AbstractPmdReport extends 
AbstractMavenReport {
     /**
      * Gets the comma separated list of effective include patterns.
      *
-     * @return the comma separated list of effective include patterns, never 
<code>null</code>.
+     * @return the comma separated list of effective include patterns, never 
<code>null</code>
      */
     private String getIncludes() {
         Collection<String> patterns = new LinkedHashSet<>();
@@ -406,7 +408,7 @@ public abstract class AbstractPmdReport extends 
AbstractMavenReport {
     /**
      * Gets the comma separated list of effective exclude patterns.
      *
-     * @return the comma separated list of effective exclude patterns, never 
<code>null</code>.
+     * @return the comma separated list of effective exclude patterns, never 
<code>null</code>
      */
     private String getExcludes() {
         Collection<String> patterns = new 
LinkedHashSet<>(FileUtils.getDefaultExcludesAsList());
diff --git 
a/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdViolationCheckMojo.java 
b/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdViolationCheckMojo.java
index 0f16e5e..5591ba3 100644
--- 
a/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdViolationCheckMojo.java
+++ 
b/src/main/java/org/apache/maven/plugins/pmd/AbstractPmdViolationCheckMojo.java
@@ -33,10 +33,10 @@ import 
org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 /**
  * Base class for mojos that check if there were any PMD violations.
  *
- * @param <D> type of the check, e.g. {@link 
org.apache.maven.plugins.pmd.model.Violation}
- * or {@link org.apache.maven.plugins.pmd.model.Duplication}.
  * @author <a href="mailto:[email protected]";>Brett Porter</a>
  * @version $Id$
+ * @param <D> type of the check, e.g. {@link 
org.apache.maven.plugins.pmd.model.Violation}
+ * or {@link org.apache.maven.plugins.pmd.model.Duplication}.
  */
 public abstract class AbstractPmdViolationCheckMojo<D> extends AbstractMojo {
     /**
@@ -71,7 +71,7 @@ public abstract class AbstractPmdViolationCheckMojo<D> 
extends AbstractMojo {
     private boolean verbose;
 
     /**
-     * Print details of errors that cause build failure
+     * Print details of errors that cause build failure.
      *
      * @since 3.0
      */
@@ -173,7 +173,7 @@ public abstract class AbstractPmdViolationCheckMojo<D> 
extends AbstractMojo {
     }
 
     /**
-     * Method for collecting the violations found by the PMD tool
+     * Method for collecting the violations found by the PMD tool.
      *
      * @return an int that specifies the number of violations found
      */
@@ -207,7 +207,7 @@ public abstract class AbstractPmdViolationCheckMojo<D> 
extends AbstractMojo {
     protected abstract ViolationDetails<D> newViolationDetailsInstance();
 
     /**
-     * Prints the warnings and failures
+     * Prints the warnings and failures.
      *
      * @param failures list of failures
      * @param warnings list of warnings
@@ -262,22 +262,22 @@ public abstract class AbstractPmdViolationCheckMojo<D> 
extends AbstractMojo {
     }
 
     /**
-     * Formats the failure details and prints them as an INFO message
+     * Formats the failure details and prints them as an INFO message.
      *
      * @param item either a {@link 
org.apache.maven.plugins.pmd.model.Violation} from PMD
      * or a {@link org.apache.maven.plugins.pmd.model.Duplication} from CPD
-     * @param severity the found issue is prefixed with the given severity, 
usually "Warning" or "Failure".
+     * @param severity the found issue is prefixed with the given severity, 
usually "Warning" or "Failure"
      */
     protected abstract void printError(D item, String severity);
 
     /**
-     * Gets the attributes and text for the violation tag and puts them in a 
HashMap
+     * Gets the attributes and text for the violation tag and puts them in a 
HashMap.
      *
      * @param analysisFile the xml output from PMD or CPD
      * @return all PMD {@link org.apache.maven.plugins.pmd.model.Violation}s
-     * or CPD {@link org.apache.maven.plugins.pmd.model.Duplication}s.
-     * @throws XmlPullParserException if the analysis file contains invalid XML
+     * or CPD {@link org.apache.maven.plugins.pmd.model.Duplication}s
      * @throws IOException if the analysis file could be read
+     * @throws XmlPullParserException if the analysis file contains invalid XML
      */
     protected abstract List<D> getErrorDetails(File analysisFile) throws 
XmlPullParserException, IOException;
 
diff --git 
a/src/main/java/org/apache/maven/plugins/pmd/ConfigurationService.java 
b/src/main/java/org/apache/maven/plugins/pmd/ConfigurationService.java
index b5fd5aa..64dcfe9 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/ConfigurationService.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/ConfigurationService.java
@@ -47,7 +47,7 @@ import 
org.eclipse.aether.resolution.DependencyResolutionException;
 import org.eclipse.aether.resolution.DependencyResult;
 
 /**
- * utils service for provide configuration needed to execute CPD/PMD.
+ * Utils service for provide configuration needed to execute CPD/PMD.
  */
 @Named
 @Singleton
diff --git a/src/main/java/org/apache/maven/plugins/pmd/CpdReport.java 
b/src/main/java/org/apache/maven/plugins/pmd/CpdReport.java
index 90c983d..5d14a30 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/CpdReport.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/CpdReport.java
@@ -95,7 +95,7 @@ public class CpdReport extends AbstractPmdReport {
     private boolean ignoreAnnotations;
 
     /**
-     * Internationalization component
+     * Internationalization component.
      */
     private final I18N i18n;
 
@@ -114,20 +114,24 @@ public class CpdReport extends AbstractPmdReport {
         this.serviceExecutor = serviceExecutor;
     }
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     public String getName(Locale locale) {
         return getI18nString(locale, "name");
     }
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     public String getDescription(Locale locale) {
         return getI18nString(locale, "description");
     }
 
     /**
-     * @param locale The locale
-     * @param key The key to search for
-     * @return The text appropriate for the locale.
+     * @param locale the locale
+     * @param key the key to search for
+     * @return the text appropriate for the locale
      */
     protected String getI18nString(Locale locale, String key) {
         return i18n.getString("cpd-report", locale, "report.cpd." + key);
diff --git a/src/main/java/org/apache/maven/plugins/pmd/CpdReportRenderer.java 
b/src/main/java/org/apache/maven/plugins/pmd/CpdReportRenderer.java
index 58f6076..d503619 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/CpdReportRenderer.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/CpdReportRenderer.java
@@ -73,8 +73,8 @@ public class CpdReportRenderer extends 
AbstractMavenReportRenderer {
     }
 
     /**
-     * @param key The key.
-     * @return The translated string.
+     * @param key the key
+     * @return the translated string
      */
     private String getI18nString(String key) {
         return i18n.getString("cpd-report", locale, "report.cpd." + key);
diff --git 
a/src/main/java/org/apache/maven/plugins/pmd/ExcludeDuplicationsFromFile.java 
b/src/main/java/org/apache/maven/plugins/pmd/ExcludeDuplicationsFromFile.java
index 87fff0a..3aac5b6 100644
--- 
a/src/main/java/org/apache/maven/plugins/pmd/ExcludeDuplicationsFromFile.java
+++ 
b/src/main/java/org/apache/maven/plugins/pmd/ExcludeDuplicationsFromFile.java
@@ -59,7 +59,7 @@ public class ExcludeDuplicationsFromFile implements 
ExcludeFromFile<Duplication>
      * Note: The exclusion must have been loaded before via {@link 
#loadExcludeFromFailuresData(String)}.
      *
      * @param errorDetail the duplication to check
-     * @return <code>true</code> if the given duplication should be excluded, 
<code>false</code> otherwise.
+     * @return <code>true</code> if the given duplication should be excluded, 
<code>false</code> otherwise
      */
     public boolean isExcludedFromFailure(final Match errorDetail) {
         final Set<String> uniquePaths = new HashSet<>();
diff --git a/src/main/java/org/apache/maven/plugins/pmd/ExcludeFromFile.java 
b/src/main/java/org/apache/maven/plugins/pmd/ExcludeFromFile.java
index 48d1039..a0c8f8e 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/ExcludeFromFile.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/ExcludeFromFile.java
@@ -21,9 +21,9 @@ package org.apache.maven.plugins.pmd;
 import org.apache.maven.plugin.MojoExecutionException;
 
 /**
+ * @author Andreas Dangel
  * @param <D> type of violation to exclude, e.g. {@link 
org.apache.maven.plugins.pmd.model.Violation}
  * or {@link org.apache.maven.plugins.pmd.model.Duplication}.
- * @author Andreas Dangel
  */
 public interface ExcludeFromFile<D> {
     /**
@@ -36,6 +36,7 @@ public interface ExcludeFromFile<D> {
 
     /**
      * Determines how many exclusions are considered.
+     *
      * @return the number of active exclusions
      */
     int countExclusions();
@@ -45,7 +46,7 @@ public interface ExcludeFromFile<D> {
      * loaded before via {@link #loadExcludeFromFailuresData(String)}.
      *
      * @param errorDetail the violation to check
-     * @return <code>true</code> if the violation should be excluded, 
<code>false</code> otherwise.
+     * @return <code>true</code> if the violation should be excluded, 
<code>false</code> otherwise
      */
     boolean isExcludedFromFailure(D errorDetail);
 }
diff --git 
a/src/main/java/org/apache/maven/plugins/pmd/ExcludeViolationsFromFile.java 
b/src/main/java/org/apache/maven/plugins/pmd/ExcludeViolationsFromFile.java
index cdff7a0..ceb8e98 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/ExcludeViolationsFromFile.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/ExcludeViolationsFromFile.java
@@ -81,7 +81,7 @@ public class ExcludeViolationsFromFile implements 
ExcludeFromFile<Violation> {
      * loaded before via {@link #loadExcludeFromFailuresData(String)}.
      *
      * @param errorDetail the violation to check
-     * @return <code>true</code> if the violation should be excluded, 
<code>false</code> otherwise.
+     * @return <code>true</code> if the violation should be excluded, 
<code>false</code> otherwise
      */
     public boolean isExcludedFromFailure(final RuleViolation errorDetail) {
         final Map<String, String> additionalInfo = 
errorDetail.getAdditionalInfo();
diff --git a/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java 
b/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java
index ba8ebc4..f056009 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java
@@ -143,7 +143,7 @@ public class PmdReport extends AbstractPmdReport {
     private String suppressMarker;
 
     /**
-     * per default pmd executions error are ignored to not break the whole
+     * Per default pmd executions error are ignored to not break the whole.
      *
      * @since 3.1
      */
@@ -226,7 +226,7 @@ public class PmdReport extends AbstractPmdReport {
     private final ResourceManager locator;
 
     /**
-     * Internationalization component
+     * Internationalization component.
      */
     private final I18N i18n;
 
@@ -253,20 +253,24 @@ public class PmdReport extends AbstractPmdReport {
         this.serviceExecutor = serviceExecutor;
     }
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     public String getName(Locale locale) {
         return getI18nString(locale, "name");
     }
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     public String getDescription(Locale locale) {
         return getI18nString(locale, "description");
     }
 
     /**
-     * @param locale The locale
-     * @param key The key to search for
-     * @return The text appropriate for the locale.
+     * @param locale the locale
+     * @param key the key to search for
+     * @return the text appropriate for the locale
      */
     protected String getI18nString(Locale locale, String key) {
         return i18n.getString("pmd-report", locale, "report.pmd." + key);
@@ -276,7 +280,7 @@ public class PmdReport extends AbstractPmdReport {
      * Configures the PMD rulesets to be used directly.
      * Note: Usually the rulesets are configured via the property.
      *
-     * @param rulesets the PMD rulesets to be used.
+     * @param rulesets the PMD rulesets to be used
      * @see #rulesets
      */
     public void setRulesets(String[] rulesets) {
diff --git a/src/main/java/org/apache/maven/plugins/pmd/PmdReportRenderer.java 
b/src/main/java/org/apache/maven/plugins/pmd/PmdReportRenderer.java
index ebbf1fa..6cedc9b 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/PmdReportRenderer.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/PmdReportRenderer.java
@@ -105,8 +105,8 @@ public class PmdReportRenderer extends 
AbstractMavenReportRenderer {
     }
 
     /**
-     * @param key The key.
-     * @return The translated string.
+     * @param key the key
+     * @return the translated string
      */
     private String getI18nString(String key) {
         return i18n.getString("pmd-report", locale, "report.pmd." + key);
@@ -259,7 +259,9 @@ public class PmdReportRenderer extends 
AbstractMavenReportRenderer {
     private void renderViolationsTable(Collection<Violation> violationSegment) 
{
         List<Violation> violationSegmentCopy = new 
ArrayList<>(violationSegment);
         Collections.sort(violationSegmentCopy, new Comparator<Violation>() {
-            /** {@inheritDoc} */
+            /**
+             * {@inheritDoc}
+             */
             public int compare(Violation o1, Violation o2) {
                 int filenames = o1.getFileName().compareTo(o2.getFileName());
                 if (filenames == 0) {
diff --git a/src/main/java/org/apache/maven/plugins/pmd/ViolationDetails.java 
b/src/main/java/org/apache/maven/plugins/pmd/ViolationDetails.java
index b19b1bb..b09eff9 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/ViolationDetails.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/ViolationDetails.java
@@ -24,9 +24,9 @@ import java.util.List;
 /**
  * Collector of warnings and failures.
  *
+ * @author Robert Scholte
  * @param <D> type of the check, e.g. {@link 
org.apache.maven.plugins.pmd.model.Violation}
  * or {@link org.apache.maven.plugins.pmd.model.Duplication}.
- * @author Robert Scholte
  * @since 2.7
  */
 public class ViolationDetails<D> {
diff --git a/src/main/java/org/apache/maven/plugins/pmd/exec/CpdExecutor.java 
b/src/main/java/org/apache/maven/plugins/pmd/exec/CpdExecutor.java
index 5f1379c..f843e8f 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/exec/CpdExecutor.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/exec/CpdExecutor.java
@@ -92,7 +92,7 @@ public class CpdExecutor extends Executor {
      * Single arg with the filename to the serialized {@link CpdRequest}.
      *
      * <p>
-     * Exit-code: 0 = success, 1 = failure in executing
+     * Exit-code: 0 = success, 1 = failure in executing.
      *
      * @param args
      */
diff --git a/src/main/java/org/apache/maven/plugins/pmd/exec/PmdExecutor.java 
b/src/main/java/org/apache/maven/plugins/pmd/exec/PmdExecutor.java
index c9b1b6f..dacde6e 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/exec/PmdExecutor.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/exec/PmdExecutor.java
@@ -112,7 +112,7 @@ public class PmdExecutor extends Executor {
      * Single arg with the filename to the serialized {@link PmdRequest}.
      *
      * <p>
-     * Exit-code: 0 = success, 1 = failure in executing
+     * Exit-code: 0 = success, 1 = failure in executing.
      *
      * @param args
      */
@@ -254,6 +254,7 @@ public class PmdExecutor extends Executor {
 
     /**
      * Gets the errors as a single string. Each error is in its own line.
+     *
      * @param withDetails if <code>true</code> then add the error details 
additionally (contains e.g. the stacktrace)
      * @return the errors as string
      */

Reply via email to