[
https://issues.apache.org/jira/browse/SENTRY-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16210218#comment-16210218
]
Vadim Spector commented on SENTRY-1993:
---------------------------------------
[~spena], just to clarify, my response "no I do not see how they can be related
to the patch" was to your question "Are the tests related to the patch?", which
I presume was about failing tests that [[email protected]] commented on. Then
I revisited this discussions, and realized that [[email protected]] also said
he added some tests for his fix, so to make clear my response was *not* about
those - I was sure that Misha's added test case exercised the fix.
As to commit, you are right of course. I did commit after all three of us
approved code review, and only then I ran into [[email protected]]'s
discovery that the tests do not seem to be affected by his fix. Then I reviewed
the code, and found that, indeed, the added test did not exercise the fixed
code, found the right way, and published my finding.
I did open SENTRY-2008 to address HDFS path canonicalization, so things will be
addressed, and it will affect this test and potentially others. As to this
patch, we can either a) leave it as-is, or b) fix test case as I described and
then I re-submit the patch. I think (a) is ok, because it is a really trivial
patch and we have SENTRY-2008 so things won't fall between the cracks, but I do
not mind (b) either.
Preferences?
[~akolb]
> StringIndexOutOfBoundsException in HMSPathsDumper.java
> ------------------------------------------------------
>
> Key: SENTRY-1993
> URL: https://issues.apache.org/jira/browse/SENTRY-1993
> Project: Sentry
> Issue Type: Bug
> Reporter: Misha Dmitriev
> Assignee: Misha Dmitriev
> Attachments: SENTRY-1993.01.patch
>
>
> The following line in HMSPathsDumper.java is causing
> StringIndexOutOfBoundsException:
> {code}
> if (tChildPathElement.charAt(0) == DupDetector.REPLACEMENT_STRING_PREFIX) {
> {code}
> It only happens when a path element is "", when someone mistakenly specifies
> hdfs path with two "/" in the path section, like
> hdfs://server//element1//element2, instead of
> hdfs://server/element1/element2. In principle, such paths are invalid, but
> this code should be made resistant to them anyway.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)