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

Bad use of Preconditions in startFileInternal()

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.7.0
    • Component/s: namenode
    • Labels:
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      The following precondition is in the middle of startFileInternal()

      feInfo = new FileEncryptionInfo(suite, version,
              ....
      Preconditions.checkNotNull(feInfo);
      

      Preconditions are recommended to be used in the beginning of the method.
      In this case the check is no-op anyways, because the variable has just been constructed.
      Should be just removed.

        Attachments

        1. HDFS-7190.patch
          0.8 kB
          Dawson Choong

          Activity

            People

            • Assignee:
              dawson.choong Dawson Choong
              Reporter:
              shv Konstantin Shvachko
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: