gnodet-bot commented on code in PR #13954:
URL: https://github.com/apache/maven/pull/13954#discussion_r4556599623


##########
api/maven-api-core/src/main/java/org/apache/maven/api/Artifact.java:
##########
@@ -188,19 +188,22 @@ default String getExtension() {
     }
 
     /**
-     * Determines whether this artifact uses a snapshot version.
+     * Returns whether this artifact is a snapshot.
      *
-     * @return {@code true} if the artifact is a snapshot, {@code false} 
otherwise
-     * @see org.apache.maven.api.Session#isVersionSnapshot(String)
+     * @since 4.2.0
      */

Review Comment:
   ⚠️ **Incomplete Javadoc on `snapshot()`**: the new canonical method is 
missing `@return` and `@see` tags. The convention for all other accessors in 
this file includes both. The deprecated `isSnapshot()` below has them — the 
replacement should be at least as well-documented.
   
   ```suggestion
        * Returns whether this artifact uses a snapshot version.
        *
        * @return {@code true} if the artifact is a snapshot, {@code false} 
otherwise
        * @see org.apache.maven.api.Session#isVersionSnapshot(String)
        * @since 4.2.0
   ```



##########
api/maven-api-core/src/main/java/org/apache/maven/api/Artifact.java:
##########
@@ -188,19 +188,22 @@ default String getExtension() {
     }
 
     /**
-     * Determines whether this artifact uses a snapshot version.
+     * Returns whether this artifact is a snapshot.
      *
-     * @return {@code true} if the artifact is a snapshot, {@code false} 
otherwise
-     * @see org.apache.maven.api.Session#isVersionSnapshot(String)
+     * @since 4.2.0
      */
-    boolean isSnapshot();
+    boolean snapshot();
 
     /**
-     * {@return coordinates with the same identifiers as this artifact}.
-     * This is a shortcut for {@code 
session.createArtifactCoordinates(artifact)}.
-     *
-     * @see org.apache.maven.api.Session#createArtifactCoordinates(Artifact)
-     */
-    @Nonnull
-    ArtifactCoordinates toCoordinates();
+    * Determines whether this artifact uses a snapshot version.
+    *
+    * @return {@code true} if the artifact is a snapshot, {@code false} 
otherwise
+    * @see org.apache.maven.api.Session#isVersionSnapshot(String)
+    * @deprecated Use {@link #snapshot()} instead.
+    */
+    @Deprecated(since = "4.2.0", forRemoval = true)
+    default boolean isSnapshot() {
+       return snapshot();
+    }

Review Comment:
   🔧 **Wrong indentation**: 3 spaces instead of 4. All other method bodies in 
this file use 4-space indentation.
   
   ```suggestion
           return snapshot();
   ```



##########
api/maven-api-core/src/main/java/org/apache/maven/api/Artifact.java:
##########
@@ -188,19 +188,22 @@ default String getExtension() {
     }
 
     /**
-     * Determines whether this artifact uses a snapshot version.
+     * Returns whether this artifact is a snapshot.
      *
-     * @return {@code true} if the artifact is a snapshot, {@code false} 
otherwise
-     * @see org.apache.maven.api.Session#isVersionSnapshot(String)
+     * @since 4.2.0
      */
-    boolean isSnapshot();
+    boolean snapshot();
 
     /**
-     * {@return coordinates with the same identifiers as this artifact}.
-     * This is a shortcut for {@code 
session.createArtifactCoordinates(artifact)}.
-     *
-     * @see org.apache.maven.api.Session#createArtifactCoordinates(Artifact)
-     */
-    @Nonnull
-    ArtifactCoordinates toCoordinates();
+    * Determines whether this artifact uses a snapshot version.
+    *

Review Comment:
   🔧 **Javadoc block misindented**: the comment lines for `isSnapshot()` start 
with `    *` (4 spaces + asterisk) instead of `     *` (5 spaces + asterisk) 
used by every other method in this file. This will cause a Checkstyle violation.
   
   ```suggestion
        * Determines whether this artifact uses a snapshot version.
   ```



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