Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-1168

Incorrect null check in SimpleResourceDefinition.Parameter.setDeprecatedSince

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.0.3.Final
    • Fix Version/s: 2.0.4.Final
    • Component/s: Management
    • Labels:
      None

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  brian.stansberry Brian Stansberry
                  Reporter:
                  brian.stansberry Brian Stansberry
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: