pzygielo commented on code in PR #1637: URL: https://github.com/apache/maven/pull/1637#discussion_r1712662537
########## maven-artifact/src/test/java/org/apache/maven/artifact/DefaultArtifactTest.java: ########## @@ -152,4 +158,31 @@ void testMNG7780() throws Exception { new DefaultArtifact(groupId, artifactId, vr, scope, type, null, artifactHandler); assertEquals(artifact, nullVersionArtifact); } + + @ParameterizedTest + @MethodSource("invalidMavenCoordinates") + void testIllegalCoordinatesInConstructor(String groupId, String artifactId, String version) { + assertThrows( + InvalidArtifactRTException.class, + () -> new DefaultArtifact( + groupId, artifactId, version, scope, type, classifier, artifactHandler, false)); + if (version == null) { + assertThrows( + InvalidArtifactRTException.class, + () -> new DefaultArtifact( + groupId, artifactId, (VersionRange) null, scope, type, classifier, artifactHandler, false)); Review Comment: I'd think this was already covered above... -- 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