Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-18652

Path.suffix raises NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.4.0, 3.3.6
    • 3.4.0, 3.3.6
    • hdfs-client
    • None
    • Reviewed

    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

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

              Dates

                Created:
                Updated:
                Resolved: