Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-181

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: namenode
    • Labels:
      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.

      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 Nicholas Sze

        Issue Links

          Activity

            People

            • Assignee:
              Todd Lipcon
              Reporter:
              Todd Lipcon
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development