[jboss-jira] [JBoss JIRA] (AS7-5418) Resource description for platform mbean properties that throw UnsupportedOperationException should say nillable="true"
Brian Stansberry (JIRA)
jira-events at lists.jboss.org
Thu Aug 23 11:57:15 EDT 2012
[ https://issues.jboss.org/browse/AS7-5418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713385#comment-12713385 ]
Brian Stansberry commented on AS7-5418:
---------------------------------------
The :read-resource text description for such an attribute should include something like "May be 'undefined' if the VM does not support this property." Documents why what seems like a simple boolean or something may not have a value.
I believe I handled this properly in at least some cases, so have a look and make the handling (e.g. the text description) consistent.
> Resource description for platform mbean properties that throw UnsupportedOperationException should say nillable="true"
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: AS7-5418
> URL: https://issues.jboss.org/browse/AS7-5418
> Project: Application Server 7
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 7.1.2.Final (EAP)
> Environment: FreeBSD, OpenJDK 1.6
> Reporter: Brian Stansberry
> Assignee: Brian Stansberry
> Priority: Minor
>
> Some platform mbean getters are documented to throw a UOE on some VMs. The read-resource handler will catch the UOE and leave the attribute undefined, but the description says it's not nillable.
> Specifically, PlatformMBeanDescriptions.getThreadingResource()'s THREAD_CPU_TIME_ENABLED attribute, although there may well be others.
> This leads to this unit test failure on jvms where the UOE is thrown:
> failure message="thread-cpu-time-enabled is undefined"
> type="junit.framework.AssertionFailedError">junit.fra mework.AssertionFailedError: thread-cpu-time-enabled is undefined
> at junit.framework.Assert.fail(Assert.java:50)
> at junit.framework.Assert.assertTrue(Assert.java:20)
> at
> org.jboss.as.platform.mbean.PlatformMBeanResourceUnitTestCase.validateResource(PlatformMBeanResourceUn
> itTestCase.java:595)
> at org.jboss.as.platform.mbean.PlatformMBeanResourceUnitTestCase.basicResourceTest(PlatformMBeanResourceUnitTestCase.java:563)
> at
> org.jboss.as.platform.mbean.PlatformMBeanResourceUnitTestCase.testThreadingMXBean(PlatformMBeanResourceUnitTestCase.java:340)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list