Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-5044

Coverity analysis defect 128879: Redundant test

    • Type: Icon: Bug Bug
    • Resolution: Incomplete
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Dotnet Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Redundant test

      By the time the program execution reaches the test of this condition there is only one possible outcome for the test. The code at the destination of this branch is not dead, either because this condition is always true or because there is at least one other branch that reaches it. Test always evaluates the same
      /src/MongoDB.Driver.Core/Core/Authentication/MongoAWSAuthenticator.cs:99: DEADCODE 128879 At condition "password == null", the value of "password" cannot be "null".
      /src/MongoDB.Driver.Core/Core/Authentication/MongoAWSAuthenticator.cs:91: DEADCODE 128879 Condition "password != null", taking true branch. Now the value of "password" is not "null".
      /src/MongoDB.Driver.Core/Core/Authentication/MongoAWSAuthenticator.cs:99: DEADCODE 128879 The condition "password == null" cannot be true.

            Assignee:
            Unassigned Unassigned
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: