You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "Jan Hentschel (JIRA)" <ji...@apache.org> on 2017/04/04 14:35:42 UTC

[jira] [Commented] (SENTRY-1660) Useless code in ResourceAuthorizationProvider

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

Jan Hentschel commented on SENTRY-1660:
---------------------------------------

[~akolb] I reviewed the code snippets you mentioned above. They seem to do nearly the same. Some of the stuff around the actions was moved out to the *buildPermissions* methods. It doesn't seem to be something obvious. What do you think in which direction the bug goes?

> Useless code in ResourceAuthorizationProvider
> ---------------------------------------------
>
>                 Key: SENTRY-1660
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1660
>             Project: Sentry
>          Issue Type: Bug
>          Components: Sentry
>    Affects Versions: 1.8.0
>            Reporter: Alexander Kolbasov
>            Assignee: Jan Hentschel
>            Priority: Minor
>              Labels: bite-sized, newbie
>         Attachments: SENTRY-1660.001.patch
>
>
> The ResourceAuthorizationProvider class has the following code:
> {code}
>     Set<String> hierarchy = new HashSet<String>();
>     for (Authorizable authorizable : authorizables) {
>       hierarchy.add(KV_JOINER.join(authorizable.getTypeName(), authorizable.getName()));
>     }
> {code}
> The {{hierarchy}} variable is never used afterwords, so this code is completely useless.



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