You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "Jan Hentschel (JIRA)" <ji...@apache.org> on 2016/12/13 09:56:58 UTC

[jira] [Updated] (SENTRY-1513) Avoid two splits in PathsUpdate.java

     [ https://issues.apache.org/jira/browse/SENTRY-1513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Hentschel updated SENTRY-1513:
----------------------------------
    Attachment: SENTRY-1513.001.patch

Added a patch which changes the way the split works when parsing a path and corrected a spelling in PathsUpdate.

> Avoid two splits in PathsUpdate.java
> ------------------------------------
>
>                 Key: SENTRY-1513
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1513
>             Project: Sentry
>          Issue Type: Improvement
>            Reporter: Sravya Tirukkovalur
>            Priority: Trivial
>              Labels: newbie
>         Attachments: SENTRY-1513.001.patch
>
>
> {code}
> if(uriPath.split("^/").length < 2) {
> 	          throw new SentryMalformedPathException("Path part of uri does not seem right, was expecting a non empty path" +
> 	                  ": path = " + uriPath + ", uri=" + uri);
> 	        }
> 	        return Lists.newArrayList(uriPath.split("^/")[1].split("/"));
> {code}
> Also, correct the spelling in the same file
> URIs with non hdfs *schemee* will just be ignore



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)