You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "francisdb (JIRA)" <ji...@codehaus.org> on 2009/06/23 11:19:15 UTC
[jira] Created: (MSHARED-104) Verifier#assertFileNotPresent() fails
when looking for an unwanted jar resource
Verifier#assertFileNotPresent() fails when looking for an unwanted jar resource
-------------------------------------------------------------------------------
Key: MSHARED-104
URL: http://jira.codehaus.org/browse/MSHARED-104
Project: Maven Shared Components
Issue Type: Bug
Components: maven-verifier
Affects Versions: maven-verifier 1.0, maven-verifier 1.2
Reporter: francisdb
when using Verifier#assertFileNotPresent() to assert that a file is not present inside a jar, the assertion always fails.
This is because looking for the resource throws a FileNotFoundException which is not catched at the correct place. The code that performs the actual test is never run. The exception should be catched and validated to the "wanted" parameter.
This can be reproduced like this:
// always fails even if the file is not present
verifier.assertFileNotPresent("target/test.jar!/missing.xml");
I suggest creating a unit test to test this case!
--
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
[jira] (MSHARED-104) Verifier#assertFileNotPresent() fails when
looking for an unwanted jar resource
Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MSHARED-104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Rosenvold closed MSHARED-104.
--------------------------------------
Resolution: Fixed
Fix Version/s: maven-verifier-1.4
Assignee: Kristian Rosenvold
Fixed in r1421845
> Verifier#assertFileNotPresent() fails when looking for an unwanted jar resource
> -------------------------------------------------------------------------------
>
> Key: MSHARED-104
> URL: https://jira.codehaus.org/browse/MSHARED-104
> Project: Maven Shared Components
> Issue Type: Bug
> Components: maven-verifier
> Affects Versions: maven-verifier-1.0, maven-verifier-1.2
> Reporter: Francis De Brabandere
> Assignee: Kristian Rosenvold
> Fix For: maven-verifier-1.4
>
>
> when using Verifier#assertFileNotPresent() to assert that a file is not present inside a jar, the assertion always fails.
> This is because looking for the resource throws a FileNotFoundException which is not catched at the correct place. The code that performs the actual test is never run. The exception should be catched and validated to the "wanted" parameter.
> This can be reproduced like this:
> // always fails even if the file is not present
> verifier.assertFileNotPresent("target/test.jar!/missing.xml");
> I suggest creating a unit test to test this case!
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira