Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1, 3.6.3, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Looks like CharsRef.subSequence() is currently broken

      It is implemented as:

        @Override
        public CharSequence subSequence(int start, int end) {
          // NOTE: must do a real check here to meet the specs of CharSequence
          if (start < 0 || end > length || start > end) {
            throw new IndexOutOfBoundsException();
          }
          return new CharsRef(chars, offset + start, offset + end);
        }
      

      Since CharsRef constructor is (char[] chars, int offset, int length),
      Should Be:

        @Override
        public CharSequence subSequence(int start, int end) {
          // NOTE: must do a real check here to meet the specs of CharSequence
          if (start < 0 || end > length || start > end) {
            throw new IndexOutOfBoundsException();
          }
          return new CharsRef(chars, offset + start, end - start);
        }
      

        Attachments

          Activity

            People

            • Assignee:
              rcmuir Robert Muir
              Reporter:
              tsmith Tim Smith
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: