[MPLUGIN-242] NullPointerException in MojoClassVisitor.visit() unit test
Submitted by: Mikolaj Izdebski git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1590803 13f79535-47bb-0310-9956-ffa450edef68master
parent
58f5506c59
commit
62561197e8
|
|
@ -0,0 +1,5 @@
|
|||
package java.lang;
|
||||
|
||||
public class Object
|
||||
{
|
||||
}
|
||||
|
|
@ -87,4 +87,16 @@ public class TestAnnotationsReader
|
|||
new ParameterAnnotationContent( "beer", null, "thebeer", "coolbeer", false, false,
|
||||
String.class.getName() ) );
|
||||
}
|
||||
|
||||
public void testReadingJavaLangObject()
|
||||
throws Exception
|
||||
{
|
||||
MojoAnnotationsScannerRequest request = new MojoAnnotationsScannerRequest();
|
||||
request.setClassesDirectories( Collections.singletonList( new File( "target/test-classes" ) ) );
|
||||
request.setIncludePatterns( Collections.singletonList( "java/lang/Object.class" ) );
|
||||
request.setProject( new MavenProject() );
|
||||
|
||||
MojoAnnotationsScanner scanner = (MojoAnnotationsScanner) lookup( MojoAnnotationsScanner.ROLE );
|
||||
scanner.scan( request );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue