-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
feat: check if a CtType is an array type #2882
Conversation
I will try to give it some time next week. |
I fixed the problem CtArrayTypeReference isSubtypeOf java.lang.Array There remains: the call of getTypeDeclaration on CtArrayTypeReference should return null or throw an exception. class int[] implements Serializable, Cloneble {} is something real, is a bad idea from my point of view |
Thanks for the fix!
null would be dangerous NPEs for client code, I would not go this way. An exception is an option but may require specific handlers in client code. What about returning a shadow class of |
It is an interesting idea. I would probably expect more java.lang.reflect.Array then Object. |
yes, java.lang.reflect.Array is good and consistent with the rest.
Would you have time to give it a try?
|
I have not enough time to finish the pull requests I already started. So I have currently no time to do that one too. But this change should be quite simple, so any Spoon newcomer might do it too. |
I'm done here |
I'm not satisfied by this answer. Do you see another working solution?
@pvojtechovsky would you have a look at the bug in isSubTypeOf?