You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/01/10 02:53:51 UTC

[GitHub] [maven] suztomo commented on a change in pull request #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException

suztomo commented on a change in pull request #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException
URL: https://github.com/apache/maven/pull/277#discussion_r314931069
 
 

 ##########
 File path: maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
 ##########
 @@ -243,9 +243,10 @@ private Model loadPom( RepositorySystemSession session, ArtifactDescriptorReques
             }
             catch ( ArtifactResolutionException e )
             {
-                if ( e.getCause() instanceof ArtifactNotFoundException )
+                Throwable cause = e.getCause();
+                if ( cause instanceof ArtifactTransferException )
                 {
-                    missingDescriptor( session, trace, a, (Exception) e.getCause() );
+                    missingDescriptor( session, trace, a, (ArtifactTransferException) cause );
 
 Review comment:
   `ArtifactNotFoundException`  is a subclass of `ArtifactTransferException`. Previous condition to check both did not make sense.
   Clarified cast to be more specific class.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services