gnodet-bot commented on code in PR #1234:
URL: 
https://github.com/apache/maven-plugin-tools/pull/1234#discussion_r4300506234


##########
maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/ExtendedMojoDescriptor.java:
##########
@@ -90,6 +91,43 @@ public void addAfterLink(AfterLink afterLink) {
         this.afterLinks.add(afterLink);
     }
 
+    /** Returns the Maven 4 resolution injections declared by this mojo. */
+    public List<ResolutionEntry> getResolutions() {
+        return resolutions != null ? Collections.unmodifiableList(resolutions) 
: Collections.emptyList();
+    }
+
+    public void addResolution(ResolutionEntry resolution) {

Review Comment:
   ⚠️ **Javadoc missing** — `addResolution()` has no Javadoc. `addAfterLink()` 
directly above (pre-existing) documents `@param` and `@since 4.0.0`. Please add 
equivalent docs for consistency:
   
   ```suggestion
       /**
        * Adds a Maven 4 resolution injection to this mojo descriptor.
        *
        * @param resolution the resolution entry to add
        * @since 4.0.0
        */
       public void addResolution(ResolutionEntry resolution) {
   ```



##########
maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/ExtendedMojoDescriptor.java:
##########
@@ -90,6 +91,43 @@ public void addAfterLink(AfterLink afterLink) {
         this.afterLinks.add(afterLink);
     }
 
+    /** Returns the Maven 4 resolution injections declared by this mojo. */
+    public List<ResolutionEntry> getResolutions() {

Review Comment:
   ⚠️ **Incomplete Javadoc** — `getResolutions()` is missing `@return` and 
`@since`. The pre-existing `getAfterLinks()` has both. Suggest:
   
   ```suggestion
       /**
        * Returns the Maven 4 resolution injections declared by this mojo.
        *
        * @return an unmodifiable list of resolution entries; never {@code null}
        * @since 4.0.0
        */
       public List<ResolutionEntry> getResolutions() {
   ```



##########
maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/ExtendedMojoDescriptor.java:
##########
@@ -90,6 +91,43 @@ public void addAfterLink(AfterLink afterLink) {
         this.afterLinks.add(afterLink);
     }
 
+    /** Returns the Maven 4 resolution injections declared by this mojo. */
+    public List<ResolutionEntry> getResolutions() {
+        return resolutions != null ? Collections.unmodifiableList(resolutions) 
: Collections.emptyList();
+    }
+
+    public void addResolution(ResolutionEntry resolution) {
+        if (this.resolutions == null) {
+            this.resolutions = new ArrayList<>();
+        }
+        this.resolutions.add(resolution);
+    }
+
+    /** Maven 4 resolution metadata kept without a compile-time dependency on 
its API. */
+    public static class ResolutionEntry {

Review Comment:
   ⚠️ **Missing `@since` and `toString()`** — `ResolutionEntry` is a new public 
API type and should carry `@since 4.0.0` in the class Javadoc. The pre-existing 
`AfterLink` inner class has `toString()` for debugging; `ResolutionEntry` 
should too (IDEs, logging, error messages will show just the class name 
otherwise).



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