Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-16680

(7.4.z) WorkerResourceDefinition.WorkerWriteAttributeHandler implementations incorrectly handle undefined values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.4.6.CR1, 7.4.6.GA
    • 7.2.0.GA, 7.2.1.CR1
    • IO
    • None

      The WorkerResourceDefinition.WorkerWriteAttributeHandler implementations are not checking for undefined values before attempting type conversions:

      10:12:28,243 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("undefine-attribute") failed - address: ([
          ("subsystem" => "io"),
          ("worker" => "default")
      ]): java.lang.IllegalArgumentException
              at org.jboss.dmr.ModelValue.asInt(ModelValue.java:61)
              at org.jboss.dmr.ModelNode.asInt(ModelNode.java:288)
              at org.wildfly.extension.io.WorkerResourceDefinition$5.setValue(WorkerResourceDefinition.java:201)
              at org.wildfly.extension.io.WorkerResourceDefinition$WorkerWriteAttributeHandler.applyUpdateToRuntime(WorkerResourceDefinition.java:262)
              at org.jboss.as.controller.AbstractWriteAttributeHandler$1.execute(AbstractWriteAttributeHandler.java:104)
      

      That stack trace maps to WildFly 14 / WildFly Core 6 code.

      It should be fine for the attributes that have default values, as there the default value would be passed in instead of undefined. But for the others some sort of handling is needed.

      I believe that special handling should be to pass in the default value used in the XNIO code.

      Any change to add any default value to the IO subsystem management API should be done via a separate JIRA. Do not mix this bug fix with an API change.

              mpetrov@redhat.com Michal Petrov
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: