[jboss-jira] [JBoss JIRA] (WFCORE-4398) WorkerResourceDefinition.WorkerWriteAttributeHandler implementations incorrectly handle undefined values
Brian Stansberry (Jira)
issues at jboss.org
Tue Apr 2 16:43:00 EDT 2019
Brian Stansberry created WFCORE-4398:
----------------------------------------
Summary: WorkerResourceDefinition.WorkerWriteAttributeHandler implementations incorrectly handle undefined values
Key: WFCORE-4398
URL: https://issues.jboss.org/browse/WFCORE-4398
Project: WildFly Core
Issue Type: Bug
Components: IO
Affects Versions: 9.0.0.Beta1, 8.0.0.Final, 7.0.0.Final, 6.0.2.Final
Reporter: Brian Stansberry
Assignee: Flavia Rainone
The WorkerResourceDefinition.WorkerWriteAttributeHandler implementations are not checking for undefined values before attempting type conversions:
{code}
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)
{code}
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.*_
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list