lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-3589) BytesRef copy short missed the length setting
Date Thu, 24 Nov 2011 14:06:39 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-3589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13156718#comment-13156718
] 

Robert Muir commented on LUCENE-3589:
-------------------------------------

{quote}
As for ByteArrayDataInput/Output – these are fine, we all know they're; I used BytesRef#copy(short)
to avoid creating an extra object. 
{quote}

If you are worried about the object overhead of ByteArrayDataInput/Output in some loop or
something, just reuse the same one with reset()....
                
> BytesRef copy short missed the length setting
> ---------------------------------------------
>
>                 Key: LUCENE-3589
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3589
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/other
>    Affects Versions: 4.0
>         Environment: linux 64bit jdk 6
>            Reporter: peter chang
>            Assignee: Robert Muir
>              Labels: patch
>             Fix For: 4.0
>
>         Attachments: BytesRef_bug_lucene3589.patch
>
>
> when storing a short type integer to BytesRef, BytesRef missed the length setting. then
it will cause the storage size is ZERO if no continuous options on this BytesRef

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


Mime
View raw message