Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-16941

Path.suffix raises NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 3.3.2
    • None
    • hadoop-client, hdfs
    • None

    Description

      Calling the Path.suffix method on root raises a NullPointerException. Tested with hadoop-client-api 3.3.2

      Scenario:

      import org.apache.hadoop.fs.*
      
      Path root = new Path("/")
      root.getParent == null  // true
      root.suffix("bar")  // NPE is raised
      

      Stack:

      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)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pgrandjean Patrick Grandjean
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: