[
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