You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "Sergio Peña (JIRA)" <ji...@apache.org> on 2017/07/10 15:07:00 UTC
[jira] [Commented] (SENTRY-1664) HMSPaths compares strings using ==
[ https://issues.apache.org/jira/browse/SENTRY-1664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16080468#comment-16080468 ]
Sergio Peña commented on SENTRY-1664:
-------------------------------------
[~kkalyan] This jira is shown as fixed but it does not appear on master nor the sentry-ha-redesign branch. Was this fixed? or is a duplicate?
> HMSPaths compares strings using ==
> ----------------------------------
>
> Key: SENTRY-1664
> URL: https://issues.apache.org/jira/browse/SENTRY-1664
> Project: Sentry
> Issue Type: Bug
> Components: Sentry
> Affects Versions: 1.8.0
> Reporter: Alexander Kolbasov
> Assignee: kalyan kumar kalvagadda
> Priority: Minor
> Labels: bite-sized, newbie
>
> HMSPaths contains the following code:
> {code}
> void renameAuthzObject(String oldName, List<List<String>> oldPathElems,
> String newName, List<List<String>> newPathElems) {
> if ( oldPathElems == null || oldPathElems.size() == 0 || newPathElems == null || newPathElems.size() == 0
> || newName == null || oldName == null || oldName == newName) {
> return;
> }
> {code}
> Note that it used oldName == newName comparison which isn't correct - it should use equals(). Also, instead of using size() it should use isEmpty()
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)