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

    • 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

            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: