Uwe Schindler created LUCENE-10114:
--------------------------------------

             Summary: 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


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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to