[
https://issues.jboss.org/browse/WFCORE-4710?page=com.atlassian.jira.plugi...
]
Brian Stansberry commented on WFCORE-4710:
------------------------------------------
This call is meant to unescape the name:
final ObjectName objectName =
PlatformMBeanUtil.getObjectNameWithNameKey(PlatformMBeanConstants.BUFFER_POOL_MXBEAN_DOMAIN_TYPE,
bpName);
But it's not working correctly. As you say, the isRegistered check fails, and I see
that BufferPoolMXBeanAttributeHandler is the only call to that method, which makes it
suspect.
I think the problem is unescapeMBeanValue itself, which is quoting the value if it alters
it, but the original unescaped value need not be a quoted value. The result of
unescapeMBeanValue isn't used anywhere else for anything that would break because of
that flaw so it sat there lurking for eight years.
The error message is poor as well, as it uses the escaped name in the message, not the
expected actual name of the BufferPoolMXBean.
Wrong BufferPoolMXBean name used in lookup
------------------------------------------
Key: WFCORE-4710
URL:
https://issues.jboss.org/browse/WFCORE-4710
Project: WildFly Core
Issue Type: Enhancement
Components: JMX
Affects Versions: 10.0.0.Final
Reporter: Andrew Dinn
Assignee: Kabir Khan
Priority: Major
Class BufferPoolMXBeanResource transforms the name of retrieved MXBeans to handle
embedded spaces and other special characters by calling method escapeMBeanName. Later on
class BufferPoolMXBeanResourceAttributeHandler uses the name to identify the corresponding
bean. Unfortunately, when BufferPoolMXBeanResourceAttributeHandler checks that the bean is
registered it does not reverse the transformation by calling unescapeMBeanName.
This causes a lookup failure when the new buffer pool non-volatiel memory MXBean is
encountered on JDK14. Although Wildlfy appears to continue running the error message
appears to cause failures in some of the Wildfly tests, notably those that check error
stream output.
See the referenced forum thread for full details.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)