ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Velmurugan Periasamy <vperias...@hortonworks.com>
Subject Re: Review Request 66950: RANGER-2096 - remove dead code
Date Wed, 09 May 2018 15:24:44 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66950/#review202764
-----------------------------------------------------------




security-admin/src/test/java/org/apache/ranger/biz/TestRangerBizUtil.java
Line 22 (original), 22 (patched)
<https://reviews.apache.org/r/66950/#comment284752>

    Could you please update the patch? Does not apply.
    
    ```
    $ git apply --check -v < ~/Downloads/RANGER-2096.patch
    Checking patch security-admin/src/main/java/org/apache/ranger/biz/RangerBizUtil.java...
    Checking patch security-admin/src/main/java/org/apache/ranger/service/AbstractBaseResourceService.java...
    Checking patch security-admin/src/test/java/org/apache/ranger/biz/TestRangerBizUtil.java...
    error: while searching for:
    
    import org.apache.ranger.common.AppConstants;
    import org.apache.ranger.common.ContextUtil;
    import org.apache.ranger.common.RangerCommonEnums;
    import org.apache.ranger.common.RangerConstants;
    import org.apache.ranger.common.StringUtil;
    import org.apache.ranger.common.UserSessionBase;
    import org.apache.ranger.common.db.BaseDao;
    import org.apache.ranger.db.RangerDaoManager;
    import org.apache.ranger.db.XXAssetDao;
    import org.apache.ranger.db.XXPortalUserDao;
    import org.apache.ranger.db.XXResourceDao;
    import org.apache.ranger.db.XXUserDao;
    import org.apache.ranger.entity.XXAsset;
    import org.apache.ranger.entity.XXDBBase;
    import org.apache.ranger.entity.XXPortalUser;
    import org.apache.ranger.entity.XXResource;
    import org.apache.ranger.entity.XXUser;
    import org.apache.ranger.security.context.RangerContextHolder;
    import org.apache.ranger.security.context.RangerSecurityContext;
    import org.apache.ranger.view.VXAsset;
    import org.apache.ranger.view.VXDataObject;
    import org.apache.ranger.view.VXPortalUser;
    import org.apache.ranger.view.VXResource;
    import org.apache.ranger.view.VXResponse;
    
    error: patch failed: security-admin/src/test/java/org/apache/ranger/biz/TestRangerBizUtil.java:22
    error: security-admin/src/test/java/org/apache/ranger/biz/TestRangerBizUtil.java: patch
does not apply
    ```


- Velmurugan Periasamy


On May 4, 2018, 12:01 p.m., Zsombor Gegesy wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66950/
> -----------------------------------------------------------
> 
> (Updated May 4, 2018, 12:01 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-2096
>     https://issues.apache.org/jira/browse/RANGER-2096
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> There is unnecessary dead code in AbstractBaseResourceService.java, which stores the
child services in a service map, which is only called from RangerBizUtil.getVObject/getMObject
methods, which are only called from test method.
> 
> This can be removed safely.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/biz/RangerBizUtil.java a0477fb1c 
>   security-admin/src/main/java/org/apache/ranger/service/AbstractBaseResourceService.java
a64bb3048 
>   security-admin/src/test/java/org/apache/ranger/biz/TestRangerBizUtil.java 10e517fb1

> 
> 
> Diff: https://reviews.apache.org/r/66950/diff/1/
> 
> 
> Testing
> -------
> 
> Tested locally, and on a cluster
> 
> 
> Thanks,
> 
> Zsombor Gegesy
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message