[
https://issues.apache.org/jira/browse/IGNITE-1900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
wmz7year updated IGNITE-1900:
-----------------------------
Description:
I use Ignite with Spring Boot.
When start application,Spring Boot will register JMX info.
In IgniteMXBean interface,There is two method getUserAttributesFormatted and
getLifecycleBeansFormatted return Collection<String>
But In JMX DefaultMXBeanMappingFactory.makeParameterizedTypeMapping method will
get method return type.
final Type rawType = objType.getRawType();
if (rawType instanceof Class<?>) {
Class<?> c = (Class<?>) rawType;
if (c == List.class || c == Set.class || c == SortedSet.class) {
Type[] actuals = objType.getActualTypeArguments();
assert(actuals.length == 1);
if (c == SortedSet.class)
mustBeComparable(c, actuals[0]);
return makeArrayOrCollectionMapping(objType, actuals[0],
factory);
} else {
boolean sortedMap = (c == SortedMap.class);
if (c == Map.class || sortedMap) {
Type[] actuals = objType.getActualTypeArguments();
assert(actuals.length == 2);
if (sortedMap)
mustBeComparable(c, actuals[0]);
return makeTabularMapping(objType, sortedMap,
actuals[0], actuals[1], factory);
}
}
}
The Collection<String> will not match any type for this although IgniteKernal
return type is Set or List.
I think IgniteMXBean interface should change Collection to Set and List
was:
I use Ignite with Spring Boot.
When start application,Spring Boot will register JMX info.
In IgniteMXBean interface,There is two method getUserAttributesFormatted and
getLifecycleBeansFormatted return Collection<String>
But In JMX DefaultMXBeanMappingFactory.makeParameterizedTypeMapping method will
get method return type.
final Type rawType = objType.getRawType();
if (rawType instanceof Class<?>) {
Class<?> c = (Class<?>) rawType;
if (c == List.class || c == Set.class || c == SortedSet.class) {
Type[] actuals = objType.getActualTypeArguments();
assert(actuals.length == 1);
if (c == SortedSet.class)
mustBeComparable(c, actuals[0]);
return makeArrayOrCollectionMapping(objType, actuals[0],
factory);
} else {
boolean sortedMap = (c == SortedMap.class);
if (c == Map.class || sortedMap) {
Type[] actuals = objType.getActualTypeArguments();
assert(actuals.length == 2);
if (sortedMap)
mustBeComparable(c, actuals[0]);
return makeTabularMapping(objType, sortedMap,
actuals[0], actuals[1], factory);
}
}
}
The Collection<String> will not match any type for this although IgniteKernal
return type is Set.
I think IgniteMXBean interface should change Collection to Set and List
> Ignite JMX problem with Spring Boot
> -----------------------------------
>
> Key: IGNITE-1900
> URL: https://issues.apache.org/jira/browse/IGNITE-1900
> Project: Ignite
> Issue Type: Bug
> Components: 1.4
> Affects Versions: ignite-1.4
> Reporter: wmz7year
>
> I use Ignite with Spring Boot.
> When start application,Spring Boot will register JMX info.
> In IgniteMXBean interface,There is two method getUserAttributesFormatted and
> getLifecycleBeansFormatted return Collection<String>
> But In JMX DefaultMXBeanMappingFactory.makeParameterizedTypeMapping method
> will get method return type.
> final Type rawType = objType.getRawType();
> if (rawType instanceof Class<?>) {
> Class<?> c = (Class<?>) rawType;
> if (c == List.class || c == Set.class || c == SortedSet.class) {
> Type[] actuals = objType.getActualTypeArguments();
> assert(actuals.length == 1);
> if (c == SortedSet.class)
> mustBeComparable(c, actuals[0]);
> return makeArrayOrCollectionMapping(objType, actuals[0],
> factory);
> } else {
> boolean sortedMap = (c == SortedMap.class);
> if (c == Map.class || sortedMap) {
> Type[] actuals = objType.getActualTypeArguments();
> assert(actuals.length == 2);
> if (sortedMap)
> mustBeComparable(c, actuals[0]);
> return makeTabularMapping(objType, sortedMap,
> actuals[0], actuals[1], factory);
> }
> }
> }
> The Collection<String> will not match any type for this although IgniteKernal
> return type is Set or List.
> I think IgniteMXBean interface should change Collection to Set and List
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)