[ 
https://issues.apache.org/jira/browse/MJAVADOC-763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17754235#comment-17754235
 ] 

ASF GitHub Bot commented on MJAVADOC-763:
-----------------------------------------

elharo commented on code in PR #219:
URL: 
https://github.com/apache/maven-javadoc-plugin/pull/219#discussion_r1293875949


##########
src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java:
##########
@@ -594,27 +595,6 @@ public void testOptionsUmlautEncoding() throws Exception {
         }
     }
 
-    /**
-     * @throws Exception if any
-     */
-    public void testExceptions() throws Exception {
-        try {
-            Path testPom = 
unit.resolve("default-configuration/exception-test-plugin-config.xml");
-            JavadocReport mojo = lookupMojo(testPom);

Review Comment:
   No, the execute method is never invoked. The lookupMojo method fails because 
the mojo was poorly written. It's been months since I wrote this, so I'm not 
sure if the test case was always broken or the code itself, but this is trying 
to test line 604 but instead the exception is thrown before we get there. The 
test fails if you catch MojoExecutionException instead of Exception. 





> JavadocReportTest.testExceptions is broken
> ------------------------------------------
>
>                 Key: MJAVADOC-763
>                 URL: https://issues.apache.org/jira/browse/MJAVADOC-763
>             Project: Maven Javadoc Plugin
>          Issue Type: Bug
>            Reporter: Elliotte Rusty Harold
>            Priority: Major
>
> The Mojo lookup fails. This is hidden by bad exception handling in the test 
> that catches too broad an exception type. 
> [ERROR] Errors: 
> [ERROR]   
> JavadocReportTest.testExceptions:603->lookupMojo:103->AbstractMojoTestCase.lookupMojo:355->AbstractMojoTestCase.lookupMojo:426
>  ยป ComponentConfiguration Cannot load implementation hint 
> 'org.apache.maven.plugins.javadoc.stubs.ExceptionTestMavenProjectStub'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to