lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3590) minimize bytesref to be a ref to a byte[]
Date Thu, 24 Nov 2011 15:32:39 GMT


Robert Muir commented on LUCENE-3590:

BytesRef copy = BytesRef.copyOf(original);

I still think this is slightly confusing, because in my opinion this method should do:

BytesRef copy = new BytesRef();
copy.bytes = other.bytes;
copy.length = other.length;
copy.offset = other.offset;

I think we should clearly separate these 'deep copies', e.g. deepCopyOf would be better.

> minimize bytesref to be a ref to a byte[]
> -----------------------------------------
>                 Key: LUCENE-3590
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>            Priority: Blocker
> Setting this as blocker for 4.0, as this class is used in every API there.
> Currently this API is a little of a everything, sometimes its like a stringbuffer, it
> does numeric conversions, all kinds of stuff.
> We need this to be a ref to a byte[], nothing else. This other stuff can go somewhere

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message