You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "kalyan kumar kalvagadda (JIRA)" <ji...@apache.org> on 2017/05/30 22:00:06 UTC

[jira] [Commented] (SENTRY-1659) HMSPathsDumper has useless code

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

kalyan kumar kalvagadda commented on SENTRY-1659:
-------------------------------------------------

As part of SENTRY-1727, path(which is set of Entries) is used to update the object to path mapping.

> HMSPathsDumper has useless code
> -------------------------------
>
>                 Key: SENTRY-1659
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1659
>             Project: Sentry
>          Issue Type: Bug
>          Components: Sentry
>            Reporter: Alexander Kolbasov
>            Assignee: kalyan kumar kalvagadda
>            Priority: Minor
>              Labels: bite-sized, newbie
>
> The HMSPathsDumper class has the following code:
> {code}
>       if (child.getAuthzObjs().size() != 0) {
>         for (String authzObj: child.getAuthzObjs()) {
>           Set<Entry> paths = authzObjToPath.get(authzObj);
>           if (paths == null) {
>             paths = new HashSet<Entry>();
>           }
>           paths.add(child);
>         }
>       }
> {code}
> Note that local var paths is created inside the loop and never used, so this piece of code is completely useless.



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