You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2026/06/01 08:55:28 UTC
(lucene) branch branch_10x updated: Fix compilation & formatting
This is an automated email from the ASF dual-hosted git repository.
romseygeek pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/branch_10x by this push:
new e3f61505bdb Fix compilation & formatting
e3f61505bdb is described below
commit e3f61505bdb5a1d1396d7349049fc6c9460c4a67
Author: Alan Woodward <ro...@apache.org>
AuthorDate: Mon Jun 1 09:55:18 2026 +0100
Fix compilation & formatting
---
.../lucene/spatial3d/geom/SerializableObject.java | 18 +++++++++---------
.../tests/search/TestAssertingLeafCollector.java | 4 ++--
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/SerializableObject.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/SerializableObject.java
index 78ad1ca5757..b1e1af28ca2 100644
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/SerializableObject.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/SerializableObject.java
@@ -91,10 +91,10 @@ public interface SerializableObject {
*/
static SerializableObject readObject(final PlanetModel planetModel, final InputStream inputStream)
throws IOException {
- // Read the class
+ // Read the class
final Class<? extends SerializableObject> clazz = readClass(inputStream);
- return readObject(planetModel, inputStream, clazz);
- }
+ return readObject(planetModel, inputStream, clazz);
+ }
/**
* Read an object from a stream (for objects that do not need a PlanetModel).
@@ -103,10 +103,10 @@ public interface SerializableObject {
* @return the deserialized object.
*/
static SerializableObject readObject(final InputStream inputStream) throws IOException {
- // read the class
+ // read the class
final Class<? extends SerializableObject> clazz = readClass(inputStream);
- return readObject(inputStream, clazz);
- }
+ return readObject(inputStream, clazz);
+ }
/**
* Instantiate a serializable object from a stream.
@@ -202,8 +202,8 @@ public interface SerializableObject {
if (standard) {
int index = inputStream.read();
if (StandardObjects.CODE_REGISTRY.containsKey(index)) {
- return StandardObjects.CODE_REGISTRY.get(index);
- } else {
+ return StandardObjects.CODE_REGISTRY.get(index);
+ } else {
throw new IOException("No standard object found for index: " + index);
}
} else {
@@ -215,9 +215,9 @@ public interface SerializableObject {
} catch (ClassNotFoundException | IllegalAccessException | ClassCastException e) {
throw new IOException(
"Can't find or access class of correct type for deserialization: " + e.getMessage(), e);
+ }
}
}
- }
/**
* Write a string to a stream.
diff --git a/lucene/test-framework/src/test/org/apache/lucene/tests/search/TestAssertingLeafCollector.java b/lucene/test-framework/src/test/org/apache/lucene/tests/search/TestAssertingLeafCollector.java
index 2f27d5c2031..ca693179629 100644
--- a/lucene/test-framework/src/test/org/apache/lucene/tests/search/TestAssertingLeafCollector.java
+++ b/lucene/test-framework/src/test/org/apache/lucene/tests/search/TestAssertingLeafCollector.java
@@ -17,6 +17,7 @@
package org.apache.lucene.tests.search;
import java.io.IOException;
+import org.apache.lucene.search.CheckedIntConsumer;
import org.apache.lucene.search.ConstantScoreScorer;
import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.search.DocIdStream;
@@ -24,7 +25,6 @@ import org.apache.lucene.search.LeafCollector;
import org.apache.lucene.search.Scorable;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.tests.util.LuceneTestCase;
-import org.apache.lucene.util.IOIntConsumer;
public class TestAssertingLeafCollector extends LuceneTestCase {
@@ -97,7 +97,7 @@ public class TestAssertingLeafCollector extends LuceneTestCase {
private boolean consumed;
@Override
- public void forEach(int upTo, IOIntConsumer consumer) throws IOException {
+ public void forEach(int upTo, CheckedIntConsumer<IOException> consumer) throws IOException {
if (consumed == false && doc < upTo) {
consumed = true;
consumer.accept(doc);