[jboss-jira] [JBoss JIRA] (WFLY-1738) JSFSubsystemTransformers comparing ModelNode and String always returns false
Cheng Fang (JIRA)
jira-events at lists.jboss.org
Mon Jul 22 16:24:26 EDT 2013
[ https://issues.jboss.org/browse/WFLY-1738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Cheng Fang updated WFLY-1738:
-----------------------------
Description:
JSFSubsystemTransformers class has the following block, FindBugs detects the equals method between ModelNode and String:
{code}
final ModelNode value = operation.get(ModelDescriptionConstants.VALUE);
if (SLOT_ATTRIBUTE_NAME.equals(name)) {
if (value.isDefined() && value.equals(SLOT_DEFAULT_VALUE)) {
return DISCARD.transformOperation(context, address, operation);
} else {
return new TransformedOperation(operation,
new RejectionWithFailurePolicy(MESSAGES.invalidJSFSlotValue(value.asString())),
OperationResultTransformer.ORIGINAL_RESULT);
}
}
{code}
The same problem in another class JBossStandaloneEJBContainerProvider:
{code}
final ModelNode result = server.getModelControllerClient().execute(add);
if (!result.get(OUTCOME).equals(SUCCESS)) {
throw new EJBException(result.asString());
}
{code}
was:
JSFSubsystemTransformers class has the following block, FindBugs detects the equals method between ModelNode and String:
{code}
final ModelNode value = operation.get(ModelDescriptionConstants.VALUE);
if (SLOT_ATTRIBUTE_NAME.equals(name)) {
if (value.isDefined() && value.equals(SLOT_DEFAULT_VALUE)) {
return DISCARD.transformOperation(context, address, operation);
} else {
return new TransformedOperation(operation,
new RejectionWithFailurePolicy(MESSAGES.invalidJSFSlotValue(value.asString())),
OperationResultTransformer.ORIGINAL_RESULT);
}
}
{code}
> JSFSubsystemTransformers comparing ModelNode and String always returns false
> ----------------------------------------------------------------------------
>
> Key: WFLY-1738
> URL: https://issues.jboss.org/browse/WFLY-1738
> Project: WildFly
> Issue Type: Bug
> Components: JSF
> Affects Versions: 8.0.0.Beta1
> Reporter: Cheng Fang
> Assignee: Jeff Mesnil
>
> JSFSubsystemTransformers class has the following block, FindBugs detects the equals method between ModelNode and String:
> {code}
> final ModelNode value = operation.get(ModelDescriptionConstants.VALUE);
> if (SLOT_ATTRIBUTE_NAME.equals(name)) {
> if (value.isDefined() && value.equals(SLOT_DEFAULT_VALUE)) {
> return DISCARD.transformOperation(context, address, operation);
> } else {
> return new TransformedOperation(operation,
> new RejectionWithFailurePolicy(MESSAGES.invalidJSFSlotValue(value.asString())),
> OperationResultTransformer.ORIGINAL_RESULT);
> }
> }
> {code}
> The same problem in another class JBossStandaloneEJBContainerProvider:
> {code}
> final ModelNode result = server.getModelControllerClient().execute(add);
> if (!result.get(OUTCOME).equals(SUCCESS)) {
> throw new EJBException(result.asString());
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list