You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/12/26 16:32:17 UTC
[GitHub] [cloudstack] rohityadavcloud commented on issue #6966: remove instanceof checks and use reflection for admin cmd invocations
rohityadavcloud commented on issue #6966:
URL: https://github.com/apache/cloudstack/issues/6966#issuecomment-1365277009
This may not be necessary generally; the metrics API extend relevant list APIs (for example, listVirtualMachines and listVirtualMachinesMetrics) and because of this the reflections-based pattern was used.
Ideally one could have implemented that by implementing a interface that both the listVirtualMachines and listVirtualMachinesMetrics implements, and checking using `instanceof` on that interface; this would have introduced a static type checking and avoided the dynamic/runtime behaviour that reflection based code (generally) introduces.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org