> On 十二月 19, 2017, 11:53 a.m., Colm O hEigeartaigh wrote:
> > Better to have "!tokens.isEmpty()" than "tokens.size() > 0". Also, the
> > indentation inside the if statement is wrong "if (providerName == null) {".
Hi, I has updated the patch .thanks.
- pengjianhua
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/64677/#review194136
-----------------------------------------------------------
On 十二月 20, 2017, 5:54 a.m., pengjianhua wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64677/
> -----------------------------------------------------------
>
> (Updated 十二月 20, 2017, 5:54 a.m.)
>
>
> Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O
> hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan
> Neethiraj, Velmurugan Periasamy, and Qiang Zhang.
>
>
> Bugs: RANGER-1934
> https://issues.apache.org/jira/browse/RANGER-1934
>
>
> Repository: ranger
>
>
> Description
> -------
>
> Optimize the init method in BaseAuditHandler class to avoid
> ArrayIndexOutOfBoundsException
> The follow in the init method " List<String> tokens =
> MiscUtil.toArray(propPrefix, ".");
> String finalToken = tokens.get(tokens.size() - 1);".
> in the init method we should add " if (tokens.size() > 1)" to avoid
> ArrayIndexOutOfBoundsException.
>
>
> Diffs
> -----
>
>
> agents-audit/src/main/java/org/apache/ranger/audit/provider/BaseAuditHandler.java
> b095000
>
>
> Diff: https://reviews.apache.org/r/64677/diff/3/
>
>
> Testing
> -------
>
> Tested it.
>
>
> Thanks,
>
> pengjianhua
>
>