rafaelweingartner commented on a change in pull request #3005: Discover tags field on superclass of API responses URL: https://github.com/apache/cloudstack/pull/3005#discussion_r231516977
########## File path: plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java ########## @@ -109,7 +107,12 @@ public boolean start() { } response.setRelated(responseName); - Field[] responseFields = apiCmdAnnotation.responseObject().getDeclaredFields(); + List<Field> responseFields = new ArrayList<>(Arrays.asList(responseClass.getDeclaredFields())); Review comment: Instead of doing this whole loop thing, what about using `org.reflections.ReflectionUtils.getAllFields(Class<?>)`? It will produce the same result with much less code. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services