cstamas commented on code in PR #168:
URL: https://github.com/apache/maven-resolver/pull/168#discussion_r857163820


##########
maven-resolver-api/src/main/java/org/eclipse/aether/artifact/AbstractArtifact.java:
##########
@@ -43,9 +43,12 @@ public boolean isSnapshot()
         return isSnapshot( getVersion() );
     }
 
-    private static boolean isSnapshot( String version )
+    /**
+     * Returns {@code true} if passed in artifact version is a snapshot 
version.
+     */
+    public static boolean isSnapshot( String version )
     {
-        return version.endsWith( SNAPSHOT ) || SNAPSHOT_TIMESTAMP.matcher( 
version ).matches();
+        return version != null && ( version.endsWith( SNAPSHOT ) || 
SNAPSHOT_TIMESTAMP.matcher( version ).matches() );

Review Comment:
   This is method that was private before and made it now public, so I added 
here nullcheck as parameter is string, so nulcheck is better for robustness.



-- 
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-unsubscr...@maven.apache.org

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

Reply via email to