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

NPE in Path.equals

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.4.0
    • 0.5.0
    • fs
    • None

    Description

      An NPE is raised in Path.equals when testing the method with two unequal pathes and with the first one having no drive.

      This is due to operator precedence: && has a higher priority level than ?:

      See http://java.sun.com/docs/books/tutorial/java/nutsandbolts/expressions.html

      See attached patch (just added some parenthesis and a testcase).

      Attachments

        1. fixPathEquals.patch
          1.0 kB
          Frédéric Bertin

        Activity

          People

            cutting Doug Cutting
            fred.bertin Frédéric Bertin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: