[ 
https://issues.apache.org/jira/browse/RANGER-3428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17442608#comment-17442608
 ] 

Mallika Gogoi commented on RANGER-3428:
---------------------------------------

After analysing we found that there are 5 following methods which needs to be 
addressed/ checked. We analysed and tried/ checked all possible scenarios which 
might leads to NullPointerException. Details are as follows .

[getServiceDef(Long 
id)|https://github.com/apache/ranger/blob/master/agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerValidator.java#L194]
  test case1: for variable id = 0L and result = null
  test case2: for variable id = 0L and result = not null
  test case3: for variable id = value and result = null
  test case4: for variable id = value and result = not null

[getServiceDef(String 
type)|https://github.com/apache/ranger/blob/master/agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerValidator.java#L212]
  test case1: for variable type = null and result = null
  test case2: for variable type = null and result = not null
  test case3: for variable type = not null and result = null
  test case4: for variable type = not null and result = not null

[getService(Long 
id)|https://github.com/apache/ranger/blob/master/agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerValidator.java#L252]
  test case1: for variable id = 0L and result = null
  test case2: for variable id = 0L and result = not null
  test case3: for variable id = value and result = null
  test case4: for variable id = value and result = not null

[getService(String 
name)|https://github.com/apache/ranger/blob/master/agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerValidator.java#L270]
  test case1: for variable type = null and result = null
  test case2: for variable type = null and result = not null
  test case3: for variable type = not null and result = null
  test case4: for variable type = not null and result = not null

[getPolicy(Long 
id)|https://github.com/apache/ranger/blob/master/agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerValidator.java#L314]
  test case1: for variable id = 0L and result = null
  test case2: for variable id = 0L and result = not null
  test case3: for variable id = value and result = null
  test case4: for variable id = value and result = not null

Since we are not able to reproduce/ come-up with a scenario which leads to 
NullPointerException, we conclude no action required on this task.

 

CC [~mehul] 

> Null Dereference in RangerValidator.java
> ----------------------------------------
>
>                 Key: RANGER-3428
>                 URL: https://issues.apache.org/jira/browse/RANGER-3428
>             Project: Ranger
>          Issue Type: Bug
>          Components: Ranger
>            Reporter: Abhishek Kumar
>            Assignee: Mallika Gogoi
>            Priority: Minor
>
> Null dereference in RangerValidator.java line numbers : 207,225,265,283,327.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to