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

Alexander Kolbasov commented on SENTRY-1660:
--------------------------------------------

[~Jan Hentschel] There was some original intention for that code (which is 
expressed in the first snippet). Then the original intention was broken (in the 
second snippet where the dead code was introduced). The question is which one 
is right - the original one or the newer  one? Does the current behavior have a 
bug or not?

> 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)

Reply via email to