[jboss-jira] [JBoss JIRA] (WFLY-8271) Comparing incompatible types for equality: String.equals(org.jboss.dmr.ModelNode)

Amos Feng (JIRA) issues at jboss.org
Thu Mar 2 02:34:00 EST 2017


     [ https://issues.jboss.org/browse/WFLY-8271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amos Feng moved JBEAP-9234 to WFLY-8271:
----------------------------------------

              Project: WildFly  (was: JBoss Enterprise Application Platform)
                  Key: WFLY-8271  (was: JBEAP-9234)
             Workflow: GIT Pull Request workflow   (was: CDW with loose statuses v1)
          Component/s: Transactions
                           (was: Transactions)
    Affects Version/s:     (was: 7.1.0.DR12)


> Comparing incompatible types for equality: String.equals(org.jboss.dmr.ModelNode)
> ---------------------------------------------------------------------------------
>
>                 Key: WFLY-8271
>                 URL: https://issues.jboss.org/browse/WFLY-8271
>             Project: WildFly
>          Issue Type: Bug
>          Components: Transactions
>            Reporter: Amos Feng
>            Assignee: Amos Feng
>
> I found case of comparison of incompatible types for equality: String.equals(org.jboss.dmr.ModelNode)
> https://github.com/wildfly/wildfly/blob/master/transactions/src/main/java/org/jboss/as/txn/subsystem/TransactionSubsystem14Parser.java#L221
> {code}
> ...
>  final String value = reader.getAttributeValue(i);
> ...
> if (!value.equals(TransactionSubsystemRootResourceDefinition.OBJECT_STORE_PATH.getDefaultValue())) {
>      needsDefaultRelativeTo = false;
> }
> {code}
> https://github.com/wildfly/wildfly-core/blob/master/controller/src/main/java/org/jboss/as/controller/AttributeDefinition.java#L349
> {code}
> public ModelNode getDefaultValue() {
>     return defaultValue;
> }
> {code}
> Please fix the code to compare the right types.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list