agura commented on a change in pull request #7394: IGNITE-10698: Get rid of 
@MXBeanParametersNames and @MXBeanParametersDescriptions
URL: https://github.com/apache/ignite/pull/7394#discussion_r379557391
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/ignite/internal/mxbean/IgniteStandardMXBean.java
 ##########
 @@ -207,15 +221,47 @@
 
                 assert str != null;
                 assert !str.trim().isEmpty();
+            } else {
+                MXBeanParameterInfo argumentInfoAnnotation = 
getMXBeanArgumentAnnotation(m, seq);
+
+                if (argumentInfoAnnotation != null) {
+                    str = argumentInfoAnnotation.name();
+
+                    assert str != null;
+                    assert !str.trim().isEmpty();
+                }
             }
-        }
-        catch (SecurityException | ClassNotFoundException ignored) {
+        } catch (SecurityException | ClassNotFoundException ignored) {
             // No-op. Default value will be returned.
         }
 
         return str;
     }
 
+    /**
+     * Gets MXBeanArgumentInfo annotation instance from
+     * method if possible, otherwise returns null.
 
 Review comment:
   Please use `code` javadoc tag for such cases: `{@code null}`

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to