Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-494

Coverity scan issue about toString returning null

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.5.0
    • Component/s: None
    • Labels:
      None

      Description

        • CID 110934: FindBugs: Bad practice (FB.NP_TOSTRING_COULD_RETURN_NULL)
          /agents-common/src/main/java/org/apache/ranger/plugin/model/RangerPolicyResourceSignature.java: 131 in org.apache.ranger.plugin.model.RangerPolicyResourceSignature$PolicySerializer.toString()()

      ________________________________________________________________________________________________________

          • CID 110934: FindBugs: Bad practice (FB.NP_TOSTRING_COULD_RETURN_NULL)
            /agents-common/src/main/java/org/apache/ranger/plugin/model/RangerPolicyResourceSignature.java: 131 in org.apache.ranger.plugin.model.RangerPolicyResourceSignature$PolicySerializer.toString()()
            125
            126 @Override
            127 public String toString() {
            128 // invalid/empty policy gets a deterministic signature as if it had an
            129 // empty resource string
            130 if (!isPolicyValidForResourceSignatureComputation()) { CID 110934: FindBugs: Bad practice (FB.NP_TOSTRING_COULD_RETURN_NULL) org.apache.ranger.plugin.model.RangerPolicyResourceSignature$PolicySerializer.toString() may return null. 131 return null; 132 }

            133 int type = 0;
            134 if (_policy.getPolicyType() != null)

            { 135 type = _policy.getPolicyType(); 136 }

        Attachments

          Activity

            People

            • Assignee:
              aloklal99 Alok Lal
              Reporter:
              aloklal99 Alok Lal
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: