Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      This issue removes the code duplication from Token, as it shares the whole char[] buffer handling code with TermAttributeImpl. This issue removes this duplication by just extending TermAttributeImpl.

      When the parent issue LUCENE-2302 will extend TermAttribute to support CharSequence and Appendable and also the new BytesRefAttribute gets added, Token will automatically provide this too, so no further code duplication.

      This code should also be committed to trunk, as it has nothing to do with flex.

      1. LUCENE-2303.patch
        14 kB
        Uwe Schindler
      2. LUCENE-2303.patch
        13 kB
        Uwe Schindler
      3. LUCENE-2303.patch
        11 kB
        Uwe Schindler

        Activity

        Hide
        Uwe Schindler added a comment -

        Updated patch that also moves the DEFAULT_TYPE constant into the interface. This removes code duplication, too. Backwards tests pass.

        Show
        Uwe Schindler added a comment - Updated patch that also moves the DEFAULT_TYPE constant into the interface. This removes code duplication, too. Backwards tests pass.
        Hide
        Uwe Schindler added a comment -

        Small improvements to the patch, removed an inconsistency in type's null check (added null check in hashCode, too, as type may be null). Also changed this in TypeAttributeImpl.

        Will commit this soon to trunk and merge up to head in flex.

        Show
        Uwe Schindler added a comment - Small improvements to the patch, removed an inconsistency in type's null check (added null check in hashCode, too, as type may be null). Also changed this in TypeAttributeImpl. Will commit this soon to trunk and merge up to head in flex.
        Hide
        Uwe Schindler added a comment -

        Committed trunk revision: 920237

        Show
        Uwe Schindler added a comment - Committed trunk revision: 920237

          People

          • Assignee:
            Uwe Schindler
            Reporter:
            Uwe Schindler
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development