[ 
https://issues.apache.org/jira/browse/HADOOP-18652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17724055#comment-17724055
 ] 

ASF subversion and git services commented on HADOOP-18652:
----------------------------------------------------------

Commit 4627242c449bc501b722dd4542ab8ea03bdbdaae in hadoop's branch 
refs/heads/trunk from Patrick GRANDJEAN
[ https://gitbox.apache.org/repos/asf?p=hadoop.git;h=4627242c449 ]

HADOOP-18652. Path.suffix raises NullPointerException (#5653). Contributed by 
Patrick Grandjean.

Reviewed-by: Wei-Chiu Chuang <[email protected]>
Signed-off-by: Ayush Saxena <[email protected]>

> Path.suffix raises NullPointerException
> ---------------------------------------
>
>                 Key: HADOOP-18652
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18652
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: hdfs-client
>            Reporter: Patrick Grandjean
>            Assignee: Patrick Grandjean
>            Priority: Minor
>
> Calling the Path.suffix method on root raises a NullPointerException. Tested 
> with hadoop-client-api 3.3.2
> Scenario:
> {code:java}
> import org.apache.hadoop.fs.*
> Path root = new Path("/")
> root.getParent == null  // true
> root.suffix("bar")  // NPE is raised
> {code}
> Stack:
> {code:none}
> 23/03/03 15:13:18 ERROR Uncaught throwable from user code: 
> java.lang.NullPointerException
>     at org.apache.hadoop.fs.Path.<init>(Path.java:104)
>     at org.apache.hadoop.fs.Path.<init>(Path.java:93)
>     at org.apache.hadoop.fs.Path.suffix(Path.java:361)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to