-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58331/
-----------------------------------------------------------
Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O
hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan
Neethiraj, and Velmurugan Periasamy.
Bugs: RANGER-1507
https://issues.apache.org/jira/browse/RANGER-1507
Repository: ranger
Description
-------
In UserSync.java, there are some duplicate codes.
if (groupName == null || groupName.isEmpty()) {
// Perform basic user search and get the group name from the user's
group attribute name.
findBasicUserProperties(ldapContext, false);
}
if (groupName == null || groupName.isEmpty()) {
// Perform adv user search and get the group name from the user's
group attribute name.
findAdvUserProperties(ldapContext, false);
}
We checked if the groupName is null twice, IMO, we can put them together.
Diffs
-----
ugsync/ldapconfigchecktool/ldapconfigcheck/src/main/java/org/apache/ranger/ldapconfigcheck/UserSync.java
cab4072
Diff: https://reviews.apache.org/r/58331/diff/1/
Testing
-------
Thanks,
Qiang Zhang