Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JAnnotationUse should provide getters for clazz and memberValues properties #784

Closed
Tomas-Kraus opened this issue Jul 30, 2010 · 11 comments
Closed

Comments

@Tomas-Kraus
Copy link
Member

Currently there is no way to learn the annotation class and annotation
parameters from JAnnotationUse class. Class should have getters for it's members.

Environment

Operating System: All
Platform: All

Affected Versions

[2.2.1]

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
Reported by dma_k@java.net

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
Was assigned to snajper

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
snajper said:
reassigning

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
snajper said:
fixed in codemodel build, will commit when proxy gets back up

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
Marked as fixed on Thursday, April 14th 2011, 9:16:27 pm

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
dma_k said:
I have NullPointerException with current implementation. This is because when memberValues is null and getAnnotationMembers() is called, it crashes:

Caused by: java.lang.NullPointerException
	at java.util.Collections$UnmodifiableMap.<init>(Collections.java:1274)
	at java.util.Collections.unmodifiableMap(Collections.java:1260)
	at com.sun.codemodel.JAnnotationUse.getAnnotationMembers(JAnnotationUse.java:73)

getAnnotationMembers() should have a protection against this situation.

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
andreasz said:
The Current implementation is quite useless because you can't get the actual value. The JAnnotationValue class should provide at least a getter for the value that was passed to the param-Method.

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
dma_k said:
AndreasZ, what you mean I believe I have already reported as #878.

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
dma_k said:
NPE is now forked as #1040"). This simple problem was not solved within two yeas.

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAXB-784

@Tomas-Kraus
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants