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

INode.getPathComponents throws NPE when given a non-absolute path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.21.0
    • namenode
    • None

    Description

      If you pass a path that doesn't start with '/' to INode.getPathComponents, it throws a NullPointerException. Instead it should throw IllegalArgumentException to make it clear that absolute paths are required in this code.

      The attached patch fixes this, clarifies, the javadoc, and adds a test case.

      Attachments

        1. HADOOP-5700.txt
          3 kB
          Todd Lipcon
        2. HADOOP-5700-v2.txt
          2 kB
          Todd Lipcon
        3. HADOOP-5700-v2b.txt
          2 kB
          Tsz-wo Sze

        Issue Links

          Activity

            People

              tlipcon Todd Lipcon
              tlipcon Todd Lipcon
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: