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

Incorrect null check in SimpleResourceDefinition.Parameter.setDeprecatedSince

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.0.0.ER3
    • 7.0.0.ER1
    • Management
    • None

      The null check checks the field being assigned instead of the param passed in:

              public Parameters setDeprecatedSince(ModelVersion deprecatedSince) {
                  if (deprecationData == null) { // <-- OOPS!
                      throw ControllerLogger.ROOT_LOGGER.nullVar("deprecatedSince");
                  }
      
                  this.deprecationData = new DeprecationData(deprecatedSince);
      

      The field will always be null, making this method useless.

              bstansbe@redhat.com Brian Stansberry
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: