You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Abhay Kulkarni <ak...@hortonworks.com> on 2017/03/16 17:22:41 UTC

Review Request 57697: Good coding practice recommended by static code analysis

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57697/
-----------------------------------------------------------

Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.


Bugs: RANGER-1463
    https://issues.apache.org/jira/browse/RANGER-1463


Repository: ranger


Description
-------

Fix for potential NPE and performance issue


Diffs
-----

  agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBaseService.java 9955051 
  security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 26080b5 


Diff: https://reviews.apache.org/r/57697/diff/1/


Testing
-------

Created Ranger service in a local VM and ensured that the default policies are created as expected.


Thanks,

Abhay Kulkarni


Re: Review Request 57697: Good coding practice recommended by static code analysis

Posted by Ramesh Mani <rm...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57697/#review169198
-----------------------------------------------------------


Ship it!




Ship It!

- Ramesh Mani


On March 16, 2017, 6:03 p.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57697/
> -----------------------------------------------------------
> 
> (Updated March 16, 2017, 6:03 p.m.)
> 
> 
> Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1463
>     https://issues.apache.org/jira/browse/RANGER-1463
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Fix for potential NPE and performance issue
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBaseService.java 9955051 
>   security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 26080b5 
> 
> 
> Diff: https://reviews.apache.org/r/57697/diff/2/
> 
> 
> Testing
> -------
> 
> Created Ranger service in a local VM and ensured that the default policies are created as expected.
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>


Re: Review Request 57697: Good coding practice recommended by static code analysis

Posted by Velmurugan Periasamy <vp...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57697/#review169204
-----------------------------------------------------------


Ship it!




Ship It!

- Velmurugan Periasamy


On March 16, 2017, 6:03 p.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57697/
> -----------------------------------------------------------
> 
> (Updated March 16, 2017, 6:03 p.m.)
> 
> 
> Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1463
>     https://issues.apache.org/jira/browse/RANGER-1463
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Fix for potential NPE and performance issue
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBaseService.java 9955051 
>   security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 26080b5 
> 
> 
> Diff: https://reviews.apache.org/r/57697/diff/2/
> 
> 
> Testing
> -------
> 
> Created Ranger service in a local VM and ensured that the default policies are created as expected.
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>


Re: Review Request 57697: Good coding practice recommended by static code analysis

Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57697/
-----------------------------------------------------------

(Updated March 16, 2017, 6:03 p.m.)


Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.


Changes
-------

Addressed review comment


Bugs: RANGER-1463
    https://issues.apache.org/jira/browse/RANGER-1463


Repository: ranger


Description
-------

Fix for potential NPE and performance issue


Diffs (updated)
-----

  agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBaseService.java 9955051 
  security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 26080b5 


Diff: https://reviews.apache.org/r/57697/diff/2/

Changes: https://reviews.apache.org/r/57697/diff/1-2/


Testing
-------

Created Ranger service in a local VM and ensured that the default policies are created as expected.


Thanks,

Abhay Kulkarni


Re: Review Request 57697: Good coding practice recommended by static code analysis

Posted by Abhay Kulkarni <ak...@hortonworks.com>.

> On March 16, 2017, 5:33 p.m., Colm O hEigeartaigh wrote:
> > Why maintain the "ret" variable at all? Why not just "return sb.toString().trim();"?

Done


- Abhay


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57697/#review169178
-----------------------------------------------------------


On March 16, 2017, 5:22 p.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57697/
> -----------------------------------------------------------
> 
> (Updated March 16, 2017, 5:22 p.m.)
> 
> 
> Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1463
>     https://issues.apache.org/jira/browse/RANGER-1463
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Fix for potential NPE and performance issue
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBaseService.java 9955051 
>   security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 26080b5 
> 
> 
> Diff: https://reviews.apache.org/r/57697/diff/1/
> 
> 
> Testing
> -------
> 
> Created Ranger service in a local VM and ensured that the default policies are created as expected.
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>


Re: Review Request 57697: Good coding practice recommended by static code analysis

Posted by Colm O hEigeartaigh <co...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57697/#review169178
-----------------------------------------------------------



Why maintain the "ret" variable at all? Why not just "return sb.toString().trim();"?

- Colm O hEigeartaigh


On March 16, 2017, 5:22 p.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57697/
> -----------------------------------------------------------
> 
> (Updated March 16, 2017, 5:22 p.m.)
> 
> 
> Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1463
>     https://issues.apache.org/jira/browse/RANGER-1463
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Fix for potential NPE and performance issue
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBaseService.java 9955051 
>   security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 26080b5 
> 
> 
> Diff: https://reviews.apache.org/r/57697/diff/1/
> 
> 
> Testing
> -------
> 
> Created Ranger service in a local VM and ensured that the default policies are created as expected.
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>