[shrinkwrap-issues] [JBoss JIRA] (SHRINKWRAP-459) Misleading exception message when creating an Archive from a Zip file

Michal Matloka (JIRA) jira-events at lists.jboss.org
Sat Jul 13 07:16:27 EDT 2013


     [ https://issues.jboss.org/browse/SHRINKWRAP-459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michal Matloka resolved SHRINKWRAP-459.
---------------------------------------

    Resolution: Duplicate Issue


SHRINKWRAP-456
                
> Misleading exception message when creating an Archive from a Zip file
> ---------------------------------------------------------------------
>
>                 Key: SHRINKWRAP-459
>                 URL: https://issues.jboss.org/browse/SHRINKWRAP-459
>             Project: ShrinkWrap
>          Issue Type: Bug
>    Affects Versions: 1.1.2
>            Reporter: René Link
>            Assignee: Michal Matloka
>
> When I try to create an Archive from a zip file using
> ShrinkWrap.createFromZipFile(WebArchive.class, new File("not-existent-file.zip"));
> I get:
> IllegalArgumentException: File for import exist: not-existent-file.zip
> I took a look at the source code and found that the
> org.jboss.shrinkwrap.api.ArchiveFactory.createFromZipFile(Class<T>, File)
> contains the statement
> if (!(archiveFile.exists())) {
> 	throw new IllegalArgumentException("File for import exist: "
> 					+ archiveFile.getAbsolutePath());
> }
> I guess the exception message should be: File for import does not exist:

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the shrinkwrap-issues mailing list