Alok Lal created RANGER-494:
-------------------------------
Summary: Coverity scan issue about toString returning null
Key: RANGER-494
URL: https://issues.apache.org/jira/browse/RANGER-494
Project: Ranger
Issue Type: Bug
Reporter: Alok Lal
** 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 }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)