sk0x50 commented on code in PR #11046:
URL: https://github.com/apache/ignite/pull/11046#discussion_r1418713031


##########
modules/core/src/main/java/org/apache/ignite/spi/metric/jmx/ReadOnlyDynamicMBean.java:
##########
@@ -57,16 +58,19 @@ else if ("invoke".equals(actionName))
 
     /** {@inheritDoc} */
     @Override public AttributeList getAttributes(String[] attributes) {
-        AttributeList list = new AttributeList();
-
+        AttributeList attributeList = new AttributeList();

Review Comment:
   Please change `attributeList` to `attrList`
   https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules



##########
modules/core/src/main/java/org/apache/ignite/spi/metric/jmx/ReadOnlyDynamicMBean.java:
##########
@@ -57,16 +58,19 @@ else if ("invoke".equals(actionName))
 
     /** {@inheritDoc} */
     @Override public AttributeList getAttributes(String[] attributes) {
-        AttributeList list = new AttributeList();
-
+        AttributeList attributeList = new AttributeList();
+        List<Attribute> list = attributeList.asList();
         try {
             for (String attribute : attributes) {
                 Object val = getAttribute(attribute);
-
-                list.add(val);
+                if( val instanceof Attribute ) {

Review Comment:
   Following 
https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines#CodingGuidelines-BracesandIndentation
 this code should look like as follows:
   ```
               for (String attribute : attributes) {
                   Object val = getAttribute(attribute);
   
                   if (val instanceof Attribute)
                       list.add((Attribute) val);
                   else
                       list.add(new Attribute(attribute, val));
               }
   ```
   



-- 
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: [email protected]

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

Reply via email to