[
http://jira.codehaus.org/browse/QDOX-231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=270437#comment-270437
]
Michał Bartczak edited comment on QDOX-231 at 6/15/11 3:48 AM:
--------------------------------------------------------------------
The list is not null, as you wrote, but the list is also empty in a case where
we expect some annotations to be found.
When used in maven-gwt-plugin it is unable to find annotations from class:
{code:title=GreetingService.java}
@RemoteServiceRelativePath("greetings")
public interface GreetingService extends RemoteService {
String greetServer(String name) throws IllegalArgumentException;
}
{code}
The code in example receives an empty list and the for loop is never executed -
and that causes an improper behavior of plugin.
was (Author: [email protected]):
The list is not null, as you wrote, but the list is also empty in a case
where we expect some annotations to be found.
When used in maven-gwt-plugin it is unable to find annotations from class:
{code:title=GreetingService.java}
@RemoteServiceRelativePath("greetings")
public interface GreetingService extends RemoteService {
String greetServer(String name) throws IllegalArgumentException;
}
{code}
The code in example has an empty list and the for loop is never executed.
> clazz.getAnnotations() for interface returns empty list of elements.
> --------------------------------------------------------------------
>
> Key: QDOX-231
> URL: http://jira.codehaus.org/browse/QDOX-231
> Project: QDox
> Issue Type: Bug
> Affects Versions: 1.12
> Environment: Used indirectly by gwt-maven-plugin to create Async
> interfaces for GWT
> Reporter: Michał Bartczak
> Assignee: Robert Scholte
>
> clazz.getAnnotations() returns an not-null but empty table (0 elements) in
> following code (taken from gwt-maven-plugin)
> {code:title=GenerateAsyncMojo.java}
> String uri = MessageFormat.format( rpcPattern, className );
> if ( clazz.getAnnotations() != null )
> {
> for ( Annotation annotation : clazz.getAnnotations() )
> {
> getLog().debug( "annotation found on service interface " +
> annotation );
> if ( annotation.getType().getValue().equals(
> "com.google.gwt.user.client.rpc.RemoteServiceRelativePath" ) )
> {
> uri = annotation.getNamedParameter( "value" ).toString();
> // remove quotes
> uri = uri.substring( 1, uri.length() - 1 );
> getLog().debug( "@RemoteServiceRelativePath annotation
> found on service interface " + uri );
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email