You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "elharo (via GitHub)" <gi...@apache.org> on 2026/07/05 11:21:48 UTC

[I] ArtifactLocatorStrategy: ArtifactNotFoundException catch block is dead code [maven-shared-io]

elharo opened a new issue, #92:
URL: https://github.com/apache/maven-shared-io/issues/92

   ## Bug #10
   
   `ArtifactLocatorStrategy.java` lines 161-168
   
   `ArtifactNotFoundException` extends `ArtifactResolutionException` in the Maven artifact API, so the `catch (ArtifactNotFoundException e)` block at lines 165-168 is never reached — the preceding `catch (ArtifactResolutionException e)` at lines 161-164 catches all instances. This makes the second catch block dead code.


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

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


Re: [I] ArtifactLocatorStrategy: ArtifactNotFoundException catch block is dead code [maven-shared-io]

Posted by "dhritimanchakra (via GitHub)" <gi...@apache.org>.
dhritimanchakra commented on issue #92:
URL: https://github.com/apache/maven-shared-io/issues/92#issuecomment-4886354817

   Hi Could you kindly assign this to me i would really like to work in this  i am forking it and working on the issue 


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

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


Re: [I] ArtifactLocatorStrategy: ArtifactNotFoundException catch block is dead code [maven-shared-io]

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on issue #92:
URL: https://github.com/apache/maven-shared-io/issues/92#issuecomment-5023383089

   This is not a bug. `ArtifactResolutionException` and `ArtifactNotFoundException` are **sibling** classes — both extend `AbstractArtifactResolutionException` directly. Neither extends the other.
   
   ```
   AbstractArtifactResolutionException
     ├── ArtifactResolutionException
     └── ArtifactNotFoundException
   ```
   
   Both catch blocks in `ArtifactLocatorStrategy.java:161-168` are reachable. An `ArtifactNotFoundException` will not be caught by the `ArtifactResolutionException` handler.


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

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


Re: [I] ArtifactLocatorStrategy: ArtifactNotFoundException catch block is dead code [maven-shared-io]

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on issue #92:
URL: https://github.com/apache/maven-shared-io/issues/92#issuecomment-4886686057

   Bugs are not assigned to new contributors. Just send a PR. 


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

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


Re: [I] ArtifactLocatorStrategy: ArtifactNotFoundException catch block is dead code [maven-shared-io]

Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo closed issue #92: ArtifactLocatorStrategy: ArtifactNotFoundException catch block is dead code
URL: https://github.com/apache/maven-shared-io/issues/92


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

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