seregamorph commented on a change in pull request #241: [MNG-6626] fix DefaultExceptionHandler NPE URL: https://github.com/apache/maven/pull/241#discussion_r272725968
########## File path: maven-core/src/test/java/org/apache/maven/exception/DefaultExceptionHandlerTest.java ########## @@ -57,4 +64,42 @@ public void testJdk7ipv6() assertEquals( expectedReference, exceptionSummary.getReference() ); } + + @Test + public void testHandleExceptionAetherClassNotFound() + { + Throwable cause2 = new NoClassDefFoundError( "org/sonatype/aether/RepositorySystem" ); + Plugin plugin = new Plugin(); + Exception cause = new PluginContainerException( plugin, null, null, cause2 ); + PluginDescriptor pluginDescriptor = new PluginDescriptor(); + MojoDescriptor mojoDescriptor = new MojoDescriptor(); + mojoDescriptor.setPluginDescriptor( pluginDescriptor ); + MojoExecution mojoExecution = new MojoExecution(mojoDescriptor); + Throwable exception = new PluginExecutionException( mojoExecution, null, cause ); + + DefaultExceptionHandler handler = new DefaultExceptionHandler(); + ExceptionSummary summary = handler.handleException( exception ); Review comment: checking existing behaviour ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services