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


##########
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultRepositorySystemValidator.java:
##########
@@ -89,19 +106,21 @@ public void validateVersionRequest(RepositorySystemSession 
session, VersionReque
     @Override
     public void validateVersionRangeRequest(RepositorySystemSession session, 
VersionRangeRequest request) {
         ArrayList<Exception> exceptions = new ArrayList<>();
-        for (ValidatorFactory factory : validatorFactories) {
-            Validator validator = factory.newInstance(session);
-            try {
-                validator.validateArtifact(request.getArtifact());
-            } catch (Exception e) {
-                exceptions.add(e);
-            }
-            for (RemoteRepository repository : request.getRepositories()) {
+        for (Map.Entry<String, ValidatorFactory> entry : 
validatorFactories.entrySet()) {
+            Validator validator = newInstance(session, entry.getKey(), 
entry.getValue());
+            if (validator != ValidatorFactory.NOOP) {

Review Comment:
   Agreed, this is leftover from `null` being allowed.



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