You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Qiang Zhang (JIRA)" <ji...@apache.org> on 2017/03/08 02:02:37 UTC

[jira] [Created] (RANGER-1431) Do some code improvement in Java method AuthSessionService.mapEntityToViewBean

Qiang Zhang created RANGER-1431:
-----------------------------------

             Summary: Do some code improvement in Java method AuthSessionService.mapEntityToViewBean
                 Key: RANGER-1431
                 URL: https://issues.apache.org/jira/browse/RANGER-1431
             Project: Ranger
          Issue Type: Bug
          Components: admin
    Affects Versions: master
            Reporter: Qiang Zhang
            Assignee: Qiang Zhang
            Priority: Minor


In method mapEntityToViewBean of class \security-admin\src\main\java\org\apache\ranger\service\AuthSessionService.java,
there is some code can be improved:
1.The following code is repated twice, remove one of them.
{code}
viewObj.setLastName(gjUser.getLastName());
{code}
2.Check null before using gjUser.
{code}
XXPortalUser gjUser = daoMgr.getXXPortalUser().getById(resource.getUserId());
{code}
3.Family name should be last name instead of email address.
{code}
viewObj.setFamilyScreenName(gjUser.getEmailAddress());
{code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)