----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32245/#review77437 -----------------------------------------------------------
ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java <https://reviews.apache.org/r/32245/#comment125493> It would be safer to handle null value for userEntry and userEntry.getAttributes() as well; unless it is certain this didn't cause the NPE issue and that these will never be null. Attribute userNameAttr = (userEntry != null && userEntry.getAttributes() != null) ? userEntry.getAttributyes.get(userNameAttribute) : null; - Madhan Neethiraj On March 19, 2015, 5:39 p.m., dilli dorai wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/32245/ > ----------------------------------------------------------- > > (Updated March 19, 2015, 5:39 p.m.) > > > Review request for ranger. > > > Bugs: RANGER-320 > https://issues.apache.org/jira/browse/RANGER-320 > > > Repository: ranger > > > Description > ------- > > RANGER-320: Usersync NPE when object does not have userNameAttribute > > > Diffs > ----- > > > ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java > b6bb811 > > Diff: https://reviews.apache.org/r/32245/diff/ > > > Testing > ------- > > Reproduced NPE before the patch. > Verified NPE is not triggered after the patch. > > > Thanks, > > dilli dorai > >
