Brian Stansberry created WFCORE-189:
---------------------------------------
Summary: Deprecate "new OperationException(ModelNode
failureDescription)"
Key: WFCORE-189
URL:
https://issues.jboss.org/browse/WFCORE-189
Project: WildFly Core
Issue Type: Task
Components: Domain Management
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Priority: Minor
Fix For: 1.0.0.Beta1
The OperationException(ModelNode failureDescription) constructor javadoc states that it
"Constructs a {@code OperationFailedException} with no detail message." The
absence of a detail message makes it an add case for normal exception handling code, as
getMessage() and getLocalizedMessage() return null and toString() just returns the class
name.
The vast majority of uses of this constructor just pass a ModelType.STRING ModelNode, so
they should just call the constructor that takes a String param. For the few other cases
that want to pass through some sort of complex ModelNode failureDescription for
transmission to the client, they should call the OFE(String, ModelNode) variant and
provide some sort of normal message in addition to the ModelNode.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)