[
https://jira.jboss.org/jira/browse/JASSIST-73?page=com.atlassian.jira.plu...
]
Shigeru Chiba commented on JASSIST-73:
--------------------------------------
Have you tried method.getAnnotations()? It would raise an exception if one of the
annotation types is not found. getAvailableAnnotations() simple ignores an unknown
annotation and returns null.
getAvailableAnnotations() sometimes returns null for the same method
in unittesting
-----------------------------------------------------------------------------------
Key: JASSIST-73
URL:
https://jira.jboss.org/jira/browse/JASSIST-73
Project: Javassist
Issue Type: Bug
Environment: Eclipse Ganymede, Windows Vista, jUnit 3.4...
Reporter: Christian Ã
kerström
Assignee: Shigeru Chiba
We have developed a jUnit testcase that test the annotation for an existing method.
Our own classloader first loads the class that contains the method and then tries to get
any available annotations.
Our annotated method looks like this, using our own NotificationEmitter.class.
@NotificationEmitter(description = "Notifies xxx", type = xxx.class)
public void method() {
...
}
Sometimes when we call method.getAvailableAnnotations(); it returns
When it fails seems to be very nondeterministic.
Any help would be appreciated.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira