Alexander Kolbasov created SENTRY-1664:
------------------------------------------
Summary: 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
Priority: Minor
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.3.15#6346)