elek commented on a change in pull request #1105:
URL: https://github.com/apache/hadoop-ozone/pull/1105#discussion_r443568885



##########
File path: 
hadoop-ozone/insight/src/main/java/org/apache/hadoop/ozone/insight/ConfigurationSubCommand.java
##########
@@ -71,9 +71,9 @@ private void showConfig(Class clazz, Type type) {
 
     String prefix = configGroup.prefix();
 
-    for (Method method : clazz.getMethods()) {
-      if (method.isAnnotationPresent(Config.class)) {
-        Config config = method.getAnnotation(Config.class);
+    for (Field field : clazz.getDeclaredFields()) {

Review comment:
       Good point.
   
   But I am afraid we need a unit test to here to prove if it works as it's a 
more complex logic. I added one to prove it work.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to