Details

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

      Description

      currently the BytesRef.copy[Int,Short,Long] api is only used by IndexDocValues and it seems it is pretty unique. I think we should move this into a package private class in o.a.l.i.values we can still open this up if it is needed by other packages.

      1. LUCENE-3591.patch
        11 kB
        Simon Willnauer
      2. LUCENE-3591.patch
        8 kB
        Simon Willnauer

        Activity

        Hide
        Simon Willnauer added a comment -

        here is a patch moving this into pkg private BytesRefUtils

        Show
        Simon Willnauer added a comment - here is a patch moving this into pkg private BytesRefUtils
        Hide
        Robert Muir added a comment -

        +1

        I think in most cases people that want to do this are happy with ByteArrayDataInput/Output, its reusable
        and supports the DataInput/Output API completely. So most existing consumers that want to write a long
        to a bytearray referred by a BytesRef are using these classes.

        But for DV this is a good solution, removes some 'non-ref' APIs/minimizes our API exposure.

        Show
        Robert Muir added a comment - +1 I think in most cases people that want to do this are happy with ByteArrayDataInput/Output, its reusable and supports the DataInput/Output API completely. So most existing consumers that want to write a long to a bytearray referred by a BytesRef are using these classes. But for DV this is a good solution, removes some 'non-ref' APIs/minimizes our API exposure.
        Hide
        Simon Willnauer added a comment -

        moved the asInt, asLong, asShort counterparts into BytesRefUtils too. Currently only used in the test but nice for consistency.

        I will commit this later today

        Show
        Simon Willnauer added a comment - moved the asInt, asLong, asShort counterparts into BytesRefUtils too. Currently only used in the test but nice for consistency. I will commit this later today
        Hide
        Simon Willnauer added a comment -

        committed to trunk in rev. 1205937

        Show
        Simon Willnauer added a comment - committed to trunk in rev. 1205937

          People

          • Assignee:
            Simon Willnauer
            Reporter:
            Simon Willnauer
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development