Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-4750 Support NFSv3 interface to HDFS
  3. HDFS-5107

Fix array copy error in Readdir and Readdirplus responses

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: 2.1.1-beta
    • Component/s: nfs
    • Labels:
      None

      Description

      System.arraycopy(this.entries, 0, entries, 0, entries.length);
      it should be
      System.arraycopy(entries, 0, this.entries, 0, entries.length);

      Findbugs gives EI2 warning if directly assign entries to this.entries:
      EI2: May expose internal representation by incorporating reference to mutable object (EI_EXPOSE_REP2)

      This caused NFS to fail to return directory content.

        Attachments

        1. HDFS-5107.patch.3
          4 kB
          Brandon Li
        2. HDFS-5107.patch.2
          2 kB
          Brandon Li

          Activity

            People

            • Assignee:
              brandonli Brandon Li
              Reporter:
              brandonli Brandon Li
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: