You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Uwe Schindler (Jira)" <ji...@apache.org> on 2021/09/19 21:53:00 UTC

[jira] [Assigned] (LUCENE-10114) Remove unused byte order mark in Lucene90PostingsWriter

     [ https://issues.apache.org/jira/browse/LUCENE-10114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler reassigned LUCENE-10114:
--------------------------------------

    Assignee: Uwe Schindler

> Remove unused byte order mark in Lucene90PostingsWriter
> -------------------------------------------------------
>
>                 Key: LUCENE-10114
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10114
>             Project: Lucene - Core
>          Issue Type: Task
>    Affects Versions: main (9.0)
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Major
>
> While reviewing the byte order in lucene index, I found the following code in {{Lucene90PostingsWriter}}:
> {code:java}
> ByteOrder byteOrder = ByteOrder.nativeOrder();
> if (byteOrder == ByteOrder.BIG_ENDIAN) {
>   docOut.writeByte((byte) 'B');
> } else if (byteOrder == ByteOrder.LITTLE_ENDIAN) {
>   docOut.writeByte((byte) 'L');
> } else {
>   throw new Error();
> }
> {code}
> Actually this byte is consumed nowhere, as the file is only used via seeking and the offsets are just 1 larger. We should remove this code.
> Why was this added?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org