You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2013/01/10 11:48:13 UTC
[jira] [Created] (LUCENE-4674) Consistently set offset=0 in
BytesRef.copyBytes
Adrien Grand created LUCENE-4674:
------------------------------------
Summary: Consistently set offset=0 in BytesRef.copyBytes
Key: LUCENE-4674
URL: https://issues.apache.org/jira/browse/LUCENE-4674
Project: Lucene - Core
Issue Type: Task
Reporter: Adrien Grand
Assignee: Adrien Grand
Priority: Minor
BytesRef.copyBytes(BytesRef other) has two branches:
- either the destination array is large enough and it will copy bytes after offset,
- or it needs to resize and in that case it will set offset = 0.
I think this method should always set offset = 0 for consistency, and to avoid resizing when other.length is larger than this.bytes.length - this.offset but smaller than this.bytes.length.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org