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

Coverity static analysis: Explicit null dereferenced in IdentityCredentials (Elytron)

    XMLWordPrintable

Details

    Description

      Coverity static-analysis scan found possible use of null object in IdentityCredentials.contains(Class) method.

      https://scan7.coverity.com/reports.htm#v16159/p11778/fileInstanceId=5862869&defectInstanceId=1561289&mergedDefectId=1377460
      The method returns

      return contains(credentialType, null);
      

      If the virtual call resolves to type CredentailNode, then the contains() call may result in NPE, because the null is used as algorthmName in:

      return credentialType.isInstance(credential) && algorithmName.equals(((AlgorithmCredential) credential).getAlgorithm());
      

      Attachments

        Issue Links

          Activity

            People

              rhn-support-ivassile Ilia Vassilev
              josef.cacek@gmail.com Josef Cacek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: