Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public void apply(Project project) {
"CheckReturnValue:OFF", // we don't use these annotations
"CheckedExceptionNotThrown:OFF", // TODO: new, not checked if applicable to Lucene
"ClassCanBeStatic:OFF", // noisy
"ClassInitializationDeadlock:OFF", // TODO: there are problems
"ClassInitializationDeadlock:ERROR",
"ClassName:OFF", // TODO: new, not checked if applicable to Lucene
"ClassNamedLikeTypeParameter:OFF", // TODO: new, not checked if applicable to Lucene
"ClassNewInstance:WARN",
Expand Down
2 changes: 2 additions & 0 deletions gradle/regenerate/moman/gen_BulkOperation.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ def p64_decode(bpv, f, bits):
*/\n''')

f.write('abstract class BulkOperation implements PackedInts.Decoder, PackedInts.Encoder {\n')
f.write(' @SuppressWarnings("ClassInitializationDeadlock") // FIXME: may cause hangs!\n')
f.write(' private static final BulkOperation[] packedBulkOps = new BulkOperation[] {\n')

for bpv in range(1, 65):
Expand All @@ -310,6 +311,7 @@ def p64_decode(bpv, f, bits):
f.write('\n')

f.write(' // NOTE: this is sparse (some entries are null):\n')
f.write(' @SuppressWarnings("ClassInitializationDeadlock") // FIXME: may cause hangs!\n')
f.write(' private static final BulkOperation[] packedSingleBlockBulkOps = new BulkOperation[] {\n')
for bpv in range(1, max(PACKED_64_SINGLE_BLOCK_BPV) + 1):
if bpv in PACKED_64_SINGLE_BLOCK_BPV:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* Parser for trec doc content, invoked on doc text excluding <DOC> and <DOCNO> which
* are handled in TrecContentSource. Required to be stateless and hence thread safe.
*/
@SuppressWarnings("ClassInitializationDeadlock") // FIXME: may cause hangs!
public abstract class TrecDocParser {

/** Types of trec parse paths, */
Expand Down
4 changes: 2 additions & 2 deletions lucene/core/src/generated/checksums/utilGenPacked.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"gradle/regenerate/moman/gen_BulkOperation.py": "d721930b5dae7f938b52a17700eb84b157930b2b",
"gradle/regenerate/moman/gen_BulkOperation.py": "da9eccf0c8dd33325df5f1e76a1de74226035734",
"gradle/regenerate/moman/gen_Packed64SingleBlock.py": "0fd2a498c3edbd195a68c2d1d686be0aed51a104",
"lucene/core/src/java/org/apache/lucene/util/packed/BulkOperation.java": "c4e16930960a18e74802c56ee60f8e83bd8b6dd2",
"lucene/core/src/java/org/apache/lucene/util/packed/BulkOperation.java": "35a89e4f3dd37084cc059a784bcbeb384256773b",
"lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked.java": "2b0d9226bae8a07ce4970bcaa9d4d0cd4fe2c79a",
"lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked1.java": "c483aa35c275bacc1f3a010c5b879441be502108",
"lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked10.java": "35fe8a9c9a91cd840b239af4ddd1e0de53ef1404",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
*/
public class CharArrayMap<V> extends AbstractMap<Object, V> {
// private only because missing generics
@SuppressWarnings("ClassInitializationDeadlock") // FIXME: may cause hangs!
private static final CharArrayMap<?> EMPTY_MAP = new EmptyCharArrayMap<>();

private static final int INIT_SIZE = 8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ public final PostingsEnum postings(PostingsEnum reuse) throws IOException {
* Attributes to it. This should not be a problem, as the enum is always empty and the existence
* of unused Attributes does not matter.
*/
@SuppressWarnings("ClassInitializationDeadlock") // FIXME: may cause hangs!
public static final TermsEnum EMPTY =
new BaseTermsEnum() {

Expand Down
2 changes: 2 additions & 0 deletions lucene/core/src/java/org/apache/lucene/store/IOContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ interface FileOpenHint {}
* <p>It will use {@link ReadAdvice#RANDOM} by default, unless set by system property {@code
* org.apache.lucene.store.defaultReadAdvice}.
*/
@SuppressWarnings("ClassInitializationDeadlock") // FIXME: may cause hangs!
IOContext DEFAULT = new DefaultIOContext();

/**
Expand All @@ -58,6 +59,7 @@ interface FileOpenHint {}
* <p>This context should only be used when the read operations will be performed in the same
* thread as the thread that opens the underlying storage.
*/
@SuppressWarnings("ClassInitializationDeadlock") // FIXME: may cause hangs!
IOContext READONCE = new DefaultIOContext(DataAccessHint.SEQUENTIAL, ReadOnceHint.INSTANCE);

/** Returns an {@link IOContext} for merging with the specified {@link MergeInfo} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

/** Efficient sequential read/write of packed integers. */
abstract class BulkOperation implements PackedInts.Decoder, PackedInts.Encoder {
@SuppressWarnings("ClassInitializationDeadlock") // FIXME: may cause hangs!
private static final BulkOperation[] packedBulkOps =
new BulkOperation[] {
new BulkOperationPacked1(),
Expand Down Expand Up @@ -89,6 +90,7 @@ abstract class BulkOperation implements PackedInts.Decoder, PackedInts.Encoder {
};

// NOTE: this is sparse (some entries are null):
@SuppressWarnings("ClassInitializationDeadlock") // FIXME: may cause hangs!
private static final BulkOperation[] packedSingleBlockBulkOps =
new BulkOperation[] {
new BulkOperationPackedSingleBlock(1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,23 @@ public interface DistanceStyle {
// convenient access to built-in styles:

/** Arc distance calculator */
@SuppressWarnings("ClassInitializationDeadlock") // FIXME: may cause hangs!
public static final ArcDistance ARC = ArcDistance.INSTANCE;

/** Linear distance calculator */
@SuppressWarnings("ClassInitializationDeadlock") // FIXME: may cause hangs!
public static final LinearDistance LINEAR = LinearDistance.INSTANCE;

/** Linear distance squared calculator */
@SuppressWarnings("ClassInitializationDeadlock") // FIXME: may cause hangs!
public static final LinearSquaredDistance LINEAR_SQUARED = LinearSquaredDistance.INSTANCE;

/** Normal distance calculator */
@SuppressWarnings("ClassInitializationDeadlock") // FIXME: may cause hangs!
public static final NormalDistance NORMAL = NormalDistance.INSTANCE;

/** Normal distance squared calculator */
@SuppressWarnings("ClassInitializationDeadlock") // FIXME: may cause hangs!
public static final NormalSquaredDistance NORMAL_SQUARED = NormalSquaredDistance.INSTANCE;

/**
Expand Down
Loading