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

Steve Loughran commented on HDFS-16941:
---------------------------------------

patch with test welcome...

> Path.suffix raises NullPointerException
> ---------------------------------------
>
>                 Key: HDFS-16941
>                 URL: https://issues.apache.org/jira/browse/HDFS-16941
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hadoop-client, hdfs
>    Affects Versions: 3.3.2
>            Reporter: 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: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to