File tree Expand file tree Collapse file tree
modules/core/src/main/java/org/apache/ignite/spi/metric/jmx Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717
1818package org .apache .ignite .spi .metric .jmx ;
1919
20+ import java .util .List ;
2021import javax .management .Attribute ;
2122import javax .management .AttributeList ;
2223import javax .management .AttributeNotFoundException ;
@@ -58,12 +59,16 @@ else if ("invoke".equals(actionName))
5859 /** {@inheritDoc} */
5960 @ Override public AttributeList getAttributes (String [] attributes ) {
6061 AttributeList list = new AttributeList ();
62+ List <Attribute > attrList = list .asList ();
6163
6264 try {
6365 for (String attribute : attributes ) {
6466 Object val = getAttribute (attribute );
6567
66- list .add (val );
68+ if (val instanceof Attribute )
69+ attrList .add ((Attribute )val );
70+ else
71+ attrList .add (new Attribute (attr , val ));
6772 }
6873
6974 return list ;
You can’t perform that action at this time.
0 commit comments