You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2008/06/13 14:28:14 UTC

[jira] Reopened: (MARTIFACT-10) Fix error handling for system-scoped artifacts

     [ http://jira.codehaus.org/browse/MARTIFACT-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann reopened MARTIFACT-10:
----------------------------------------


The fix for MNG-3288 is no duplicate, it is the origin of this issue. If the file does not exist at all, the code will bail off with "... is not a file ..." instead of "... not found in path...", i.e. the later check is effectively unreachable. So either the later {{if}} is deleted or needs to be put before the check {{!systemFile.isFile()}}.

> Fix error handling for system-scoped artifacts
> ----------------------------------------------
>
>                 Key: MARTIFACT-10
>                 URL: http://jira.codehaus.org/browse/MARTIFACT-10
>             Project: Maven Artifact
>          Issue Type: Improvement
>            Reporter: Benjamin Bentmann
>            Priority: Trivial
>         Attachments: file-error-handling.patch
>
>
> The current order of checking for error cases checks {{!File.isFile()}} before {{!File.exists()}}. However, {{!File.isFile()}} might also fail if the file does not exist at all, hence capturing the same case that is intended to be captured by the later check with {{!File.exists()}}. The order needs to be reversed to get the desired exception messages.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira