[
https://issues.apache.org/jira/browse/SENTRY-1664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergio Peña reopened SENTRY-1664:
---------------------------------
> 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)