jira-importer commented on issue #224:
URL: 
https://github.com/apache/maven-jar-plugin/issues/224#issuecomment-2956682775

   **[Jerome 
Lacoste](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=lacostej)**
 commented
   
   Further explanation to help the reviewers.
   
   The original issue was fixed by accident as part of
   
   
http://svn.apache.org/viewcvs.cgi/maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/JarSignMojo.java?rev=393237&view=diff&r1=393237&r2=393236&p1=maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/JarSignMojo.java&p2=/maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/JarSignMojo.java
   
   Look in particular to the change line
   
   - verify.setJarPath( getJarFile() );
     that became
   
   + File signedJarFile = signedjar != null ? signedjar : getJarFile();
     ...
   + verifyMojo.setJarPath( signedJarFile );
   
   Even though the fix for that NPE was put in, the unit tests initially 
provided in
   
   http://jira.codehaus.org/secure/attachment/19236/MJAR-32.diff
   
   that identified the issue weren't checked in as part of rev 393237. I thus 
updated the patch to match the current trunk. This identified a couple of new 
small related issues (other potential NPEs) identified by the same added test 
cases. So the patch
   
   http://jira.codehaus.org/secure/attachment/20071/MJAR-32-v2.diff
   
   contains both the tests cases that exploits the original issue and the new 
ones + the fixes to the new issues. Just apply the changes to the test classes 
without the changes to the source code and you will see the failures. You can 
also independently revert the fix that was checked in rev 393237 and replace
   verifyMojo.setJarPath( signedJarFile );
   by
   verifyMojo.setJarPath( getJarFile() );
   in the code and see how the newly added test cases will fail while no old 
test cases will fail.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to