Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-8271

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

    XMLWordPrintable

Details

    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

            People

              zfeng@redhat.com Zheng Feng
              zfeng@redhat.com Zheng Feng
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: