Skip to content

Commit 0c3c3ac

Browse files
committed
HSEARCH-5369 Cleanup unnecessary SuppressWarnings
1 parent 12486bb commit 0c3c3ac

File tree

21 files changed

+7
-27
lines changed

21 files changed

+7
-27
lines changed

backend/lucene/src/main/java/org/hibernate/search/backend/lucene/lowlevel/directory/impl/FileSystemAccessStrategy.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public FSDirectory createDirectory(Path indexDir, LockFactory factory) throws IO
3737

3838
public abstract FSDirectory createDirectory(Path indexDir, LockFactory factory) throws IOException;
3939

40-
@SuppressWarnings("deprecation")
4140
public static FileSystemAccessStrategy get(FileSystemAccessStrategyName name) {
4241
switch ( name ) {
4342
case AUTO:

backend/lucene/src/main/java/org/hibernate/search/backend/lucene/lowlevel/directory/impl/LocalFileSystemDirectoryProvider.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public class LocalFileSystemDirectoryProvider implements DirectoryProvider {
3737
.build();
3838

3939
@Override
40-
@SuppressWarnings("deprecation")
4140
public DirectoryHolder createDirectoryHolder(DirectoryCreationContext context) {
4241
ConfigurationPropertySource propertySource = context.configurationPropertySource();
4342
Path directoryRoot = ROOT.get( propertySource ).toAbsolutePath();

build/config/src/main/java/org/hibernate/search/build/report/loggers/LoggerCategoriesProcessor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import java.io.Writer;
1010
import java.nio.charset.StandardCharsets;
1111
import java.util.ArrayList;
12-
import java.util.Collection;
1312
import java.util.Collections;
1413
import java.util.LinkedHashMap;
1514
import java.util.List;

engine/src/main/java/org/hibernate/search/engine/search/projection/dsl/impl/HighlightProjectionOptionsStepImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public HighlightProjectionOptionsStep highlighter(String highlighterName) {
3232
return this;
3333
}
3434

35-
@SuppressWarnings("deprecation")
35+
@Deprecated(since = "8.0")
3636
@Override
3737
public SingleHighlightProjectionFinalStep single() {
3838
return new SingleHighlightProjectionFinalStepImpl();

engine/src/main/java/org/hibernate/search/engine/search/projection/spi/ListBasedProjectionCollector.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
* @param <V> The type of values to accumulate obtained by transforming extracted values ({@code E}).
1919
* @param <R> The type of the final result containing values of type {@code V}.
2020
*/
21-
@SuppressWarnings("deprecation")
2221
abstract class ListBasedProjectionCollector<E, V, R>
2322
implements ProjectionCollector<E, V, List<Object>, R> {
2423

integrationtest/backend/tck/src/main/java/org/hibernate/search/integrationtest/backend/tck/search/projection/AbstractDistanceProjectionMultiValuedBaseIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ void simple(TestedFieldStructure fieldStructure, DataSet dataSet) {
153153
/**
154154
* Test that mentioning the same projection twice works as expected.
155155
*/
156-
@SuppressWarnings("unchecked")
157156
@ParameterizedTest(name = "{0}")
158157
@MethodSource("params")
159158
void duplicated(TestedFieldStructure fieldStructure, DataSet dataSet) {

integrationtest/mapper/orm/src/test/java/org/hibernate/search/integrationtest/mapper/orm/automaticindexing/AutomaticIndexingBasicIT.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,10 @@ void sessionClear() {
358358
}
359359

360360
/**
361-
* Test that merging an entity using update() to change an indexed field
361+
* Test that merging an entity using ~update()~ merge() to change an indexed field
362362
* triggers reindexing of the indexed entity owning the property.
363363
*/
364364
@Test
365-
@SuppressWarnings("deprecation") // This is specifically about "update", which is NOT strictly equivalent to "merge"
366365
void sessionUpdate_directValueUpdate_indexedField() {
367366
with( sessionFactory ).runInTransaction( session -> {
368367
IndexedEntity entity1 = new IndexedEntity();

integrationtest/mapper/orm/src/test/java/org/hibernate/search/integrationtest/mapper/orm/search/loading/SearchQueryEntityLoadingCacheLookupIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ private void testLoadingCacheLookupExpectingSecondLevelCacheLookup(
293293
);
294294
}
295295

296-
@SuppressWarnings({ "unchecked", "deprecation" })
297296
private void testLoadingCacheLookup(EntityLoadingCacheLookupStrategy overriddenLookupStrategy,
298297
int entityCount,
299298
List<Integer> entitiesToPutInSecondLevelCache,

integrationtest/v5migrationhelper/orm/src/test/java/org/hibernate/search/test/embedded/path/depth/PathRespectDepthCaseEmbeddedTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import static org.assertj.core.api.Assertions.assertThat;
99
import static org.assertj.core.api.Assertions.assertThatThrownBy;
10-
import static org.junit.platform.launcher.core.LauncherFactory.openSession;
1110

1211
import java.util.List;
1312

lucene-next/backend/lucene/src/main/java/org/hibernate/search/backend/lucene/lowlevel/directory/impl/FileSystemAccessStrategy.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public FSDirectory createDirectory(Path indexDir, LockFactory factory) throws IO
3737

3838
public abstract FSDirectory createDirectory(Path indexDir, LockFactory factory) throws IOException;
3939

40-
@SuppressWarnings("deprecation")
4140
public static FileSystemAccessStrategy get(FileSystemAccessStrategyName name) {
4241
switch ( name ) {
4342
case AUTO:

0 commit comments

Comments
 (0)