You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Selvamohan Neethiraj (JIRA)" <ji...@apache.org> on 2015/06/06 22:39:13 UTC

[jira] [Updated] (RANGER-494) Coverity scan issue about toString returning null

     [ https://issues.apache.org/jira/browse/RANGER-494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Selvamohan Neethiraj updated RANGER-494:
----------------------------------------
    Fix Version/s: 0.5.0

> 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
>            Assignee: Alok Lal
>             Fix For: 0.5.0
>
>
> ** 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)