Uploaded image for project: 'ORC'
  1. ORC
  2. ORC-897

optimization loop termination condition in readerIsCompatible method

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.8.0
    • 1.8.0
    • Java
    • None

    Description

        private static boolean sameKeys(EncryptionKey[] first,
                                        EncryptionKey[] next) {
          if (first.length != next.length) {
            return false;
          }
          for(int k = 0; k < first.length && k < next.length; ++k) {
            if (!first[k].getKeyName().equals(next[k].getKeyName()) ||
                first[k].getKeyVersion() != next[k].getKeyVersion() ||
                first[k].getAlgorithm() != next[k].getAlgorithm()) {
              return false;
            }
          }
          return true;
        }
      

      k < next.length is not necessary
      There are five similar codes.

      Attachments

        Issue Links

          Activity

            People

              Guiyankuang Yiqun Zhang
              Guiyankuang Yiqun Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: