ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zsombor Gegesy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (RANGER-1431) Do some code improvement in Java method AuthSessionService.mapEntityToViewBean
Date Wed, 03 May 2017 11:45:04 GMT

    [ https://issues.apache.org/jira/browse/RANGER-1431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15994706#comment-15994706
] 

Zsombor Gegesy commented on RANGER-1431:
----------------------------------------

This should be added to the 0.7 branch as well, I've created a review request for it : 
https://reviews.apache.org/r/58959/

> 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
>              Labels: patch
>             Fix For: 1.0.0
>
>         Attachments: 0001-RANGER-1431-Do-some-code-improvement-in-Java-method-.patch
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> 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)

Mime
View raw message