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

WorkerResourceDefinition.WorkerWriteAttributeHandler implementations incorrectly handle undefined values

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 10.0.0.Beta2, 10.0.0.Final
    • 6.0.2.Final, 7.0.0.Final, 8.0.0.Final, 9.0.0.Beta1
    • IO
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: