Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-9215

Comparing incompatible types for equality: String.equals(org.jboss.dmr.ModelNode)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.1.0.DR14
    • 7.1.0.DR12
    • Transactions
    • None
    • Not Required

    Description

      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

      ...
       final String value = reader.getAttributeValue(i);
      ...
      if (!value.equals(TransactionSubsystemRootResourceDefinition.OBJECT_STORE_PATH.getDefaultValue())) {
           needsDefaultRelativeTo = false;
      }
      

      https://github.com/wildfly/wildfly-core/blob/master/controller/src/main/java/org/jboss/as/controller/AttributeDefinition.java#L349

      public ModelNode getDefaultValue() {
          return defaultValue;
      }
      

      Please fix the code to compare the right types.

      Attachments

        Issue Links

          Activity

            Public project attachment banner

              context keys: [headless, issue, helper, isAsynchronousRequest, project, action, user]
              current Project key: JBEAP

              People

                zfeng@redhat.com Zheng Feng
                rsvoboda@redhat.com Rostislav Svoboda
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: