Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-406

Resource description for platform mbean properties that throw UnsupportedOperationException should say nillable="true"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • Management
    • None

    Description

      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)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: