Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: maven-verifier-1.0, maven-verifier-1.2
-
Fix Version/s: maven-verifier-1.4
-
Component/s: maven-verifier
-
Labels:None
-
Number of attachments :
Description
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!
Activity
Kristian Rosenvold
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Closed [ 6 ] |
| Assignee | Kristian Rosenvold [ krosenvold ] | |
| Fix Version/s | maven-verifier-1.4 [ 17432 ] | |
| Resolution | Fixed [ 1 ] |
Fixed in r1421845