You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2021/09/20 06:39:36 UTC
[lucene] branch main updated: LUCENE-10114: Remove unused byte
order mark in Lucene90PostingsWriter (#309)
This is an automated email from the ASF dual-hosted git repository.
uschindler pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new 075d801 LUCENE-10114: Remove unused byte order mark in Lucene90PostingsWriter (#309)
075d801 is described below
commit 075d801abe46667f8391c20df8bafbefdcdf9492
Author: Uwe Schindler <us...@apache.org>
AuthorDate: Mon Sep 20 08:37:05 2021 +0200
LUCENE-10114: Remove unused byte order mark in Lucene90PostingsWriter (#309)
Co-authored-by: Robert Muir <rm...@apache.org>
---
lucene/CHANGES.txt | 3 +++
.../apache/lucene/codecs/lucene90/Lucene90PostingsWriter.java | 9 ---------
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index d786c40..9dc16e4 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -315,6 +315,9 @@ Bug fixes
* LUCENE-10101, LUCENE-9281: Use getField() instead of getDeclaredField() to
minimize security impact by analysis SPI discovery. (Uwe Schindler)
+* LUCENE-10114: Remove unused byte order mark in Lucene90PostingsWriter. This
+ was initially introduced by accident in Lucene 8.4. (Uwe Schindler)
+
Changes in Backwards Compatibility Policy
* LUCENE-9904: regenerated UAX29URLEmailTokenizer and the corresponding analyzer with up-to-date top
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90PostingsWriter.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90PostingsWriter.java
index 7e11b94..f640d8d 100644
--- a/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90PostingsWriter.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90PostingsWriter.java
@@ -25,7 +25,6 @@ import static org.apache.lucene.codecs.lucene90.Lucene90PostingsFormat.TERMS_COD
import static org.apache.lucene.codecs.lucene90.Lucene90PostingsFormat.VERSION_CURRENT;
import java.io.IOException;
-import java.nio.ByteOrder;
import org.apache.lucene.codecs.BlockTermState;
import org.apache.lucene.codecs.CodecUtil;
import org.apache.lucene.codecs.CompetitiveImpactAccumulator;
@@ -111,14 +110,6 @@ public final class Lucene90PostingsWriter extends PushPostingsWriterBase {
try {
CodecUtil.writeIndexHeader(
docOut, DOC_CODEC, VERSION_CURRENT, state.segmentInfo.getId(), state.segmentSuffix);
- 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();
- }
pforUtil = new PForUtil(new ForUtil());
if (state.fieldInfos.hasProx()) {
posDeltaBuffer = new long[BLOCK_SIZE];