Lucene - Core
  1. Lucene - Core
  2. LUCENE-6173

NumericTermAttribute does not implement deep clone since cutover to BytesRefBuilder

    Details

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

      Description

      This was an oversight. We should fix it, although NumericTermAttribute is not really a public class (it is an implementation detail).

        Activity

        Hide
        Uwe Schindler added a comment -

        In fact, this is not bug. The same happens in CharTermAttribute if you call getBytes().

        In my opinion we should fix this for 5.0 in a separate issue, so we no longer have fillBytesRef() and then getBytesRef(). The whole thing should be done in getBytesRef(), no need for fillBytesRef.

        Show
        Uwe Schindler added a comment - In fact, this is not bug. The same happens in CharTermAttribute if you call getBytes(). In my opinion we should fix this for 5.0 in a separate issue, so we no longer have fillBytesRef() and then getBytesRef(). The whole thing should be done in getBytesRef(), no need for fillBytesRef.
        Hide
        Uwe Schindler added a comment -

        This is still not optimal. Also equals/hashCode is missing.

        Show
        Uwe Schindler added a comment - This is still not optimal. Also equals/hashCode is missing.
        Hide
        ASF subversion and git services added a comment -

        Commit 1650737 from Uwe Schindler in branch 'dev/trunk'
        [ https://svn.apache.org/r1650737 ]

        LUCENE-6173: Fix deep clone

        Show
        ASF subversion and git services added a comment - Commit 1650737 from Uwe Schindler in branch 'dev/trunk' [ https://svn.apache.org/r1650737 ] LUCENE-6173 : Fix deep clone
        Hide
        ASF subversion and git services added a comment -

        Commit 1650738 from Uwe Schindler in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1650738 ]

        Merged revision(s) 1650737 from lucene/dev/trunk:
        LUCENE-6173: Fix deep clone

        Show
        ASF subversion and git services added a comment - Commit 1650738 from Uwe Schindler in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1650738 ] Merged revision(s) 1650737 from lucene/dev/trunk: LUCENE-6173 : Fix deep clone
        Hide
        Uwe Schindler added a comment -

        I fixed clone, equals, hashCode for NumericTermAttribute and spatial's CellTermAttribute.

        Show
        Uwe Schindler added a comment - I fixed clone, equals, hashCode for NumericTermAttribute and spatial's CellTermAttribute.
        Hide
        ASF subversion and git services added a comment -

        Commit 1650739 from Uwe Schindler in branch 'dev/trunk'
        [ https://svn.apache.org/r1650739 ]

        LUCENE-6173: Use Objects.hash() for simplicty. Also unbreak branch_5x

        Show
        ASF subversion and git services added a comment - Commit 1650739 from Uwe Schindler in branch 'dev/trunk' [ https://svn.apache.org/r1650739 ] LUCENE-6173 : Use Objects.hash() for simplicty. Also unbreak branch_5x
        Hide
        ASF subversion and git services added a comment -

        Commit 1650740 from Uwe Schindler in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1650740 ]

        Merged revision(s) 1650739 from lucene/dev/trunk:
        LUCENE-6173: Use Objects.hash() for simplicty. Also unbreak branch_5x

        Show
        ASF subversion and git services added a comment - Commit 1650740 from Uwe Schindler in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1650740 ] Merged revision(s) 1650739 from lucene/dev/trunk: LUCENE-6173 : Use Objects.hash() for simplicty. Also unbreak branch_5x
        Hide
        David Smiley added a comment -

        bq The whole thing should be done in getBytesRef(), no need for fillBytesRef.

        +1 to that!

        Show
        David Smiley added a comment - bq The whole thing should be done in getBytesRef(), no need for fillBytesRef. +1 to that!
        Hide
        Anshum Gupta added a comment -

        Bulk close after 5.0 release.

        Show
        Anshum Gupta added a comment - Bulk close after 5.0 release.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development