Remove deprecation suppression
Failing the build on deprecation warnings was removed in
19b3ec88af
. This commit removes the
suppressed deprecation warnings so that their use is surfaced in the
build now.
Relates #18582
This commit is contained in:
parent
718344f69b
commit
9d39b05845
|
@ -32,7 +32,6 @@ import java.io.IOException;
|
|||
|
||||
/**
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class Version {
|
||||
/*
|
||||
* The logic for ID is: XXYYZZAA, where XX is major version, YY is minor version, ZZ is revision, and AA is alpha/beta/rc indicator AA
|
||||
|
|
|
@ -34,7 +34,6 @@ import java.util.Set;
|
|||
/**
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class StopTokenFilterFactory extends AbstractTokenFilterFactory {
|
||||
|
||||
private final CharArraySet stopWords;
|
||||
|
|
|
@ -129,7 +129,6 @@ public class FsDirectoryService extends DirectoryService implements StoreRateLim
|
|||
throw new IllegalArgumentException("No directory found for type [" + storeType + "]");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static boolean isDefault(String storeType) {
|
||||
return IndexModule.Type.DEFAULT.match(storeType);
|
||||
}
|
||||
|
|
|
@ -821,7 +821,6 @@ public class Store extends AbstractIndexShardComponent implements Closeable, Ref
|
|||
final SegmentInfos segmentCommitInfos = Store.readSegmentsInfo(commit, directory);
|
||||
numDocs = Lucene.getNumDocs(segmentCommitInfos);
|
||||
commitUserDataBuilder.putAll(segmentCommitInfos.getUserData());
|
||||
@SuppressWarnings("deprecation")
|
||||
Version maxVersion = segmentCommitInfos.getMinSegmentLuceneVersion(); // we don't know which version was used to write so we take the max version.
|
||||
for (SegmentCommitInfo info : segmentCommitInfos) {
|
||||
final Version version = info.info.getVersion();
|
||||
|
|
|
@ -138,7 +138,6 @@ public class QueryDSLDocumentationTests extends ESTestCase {
|
|||
functionScoreQuery(functions);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // fuzzy queries will be removed in 4.0
|
||||
public void testFuzzy() {
|
||||
fuzzyQuery("name", "kimchy");
|
||||
}
|
||||
|
|
|
@ -2269,7 +2269,6 @@ public class HighlighterSearchIT extends ESIntegTestCase {
|
|||
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // fuzzy queries will be removed in 4.0
|
||||
public void testPostingsHighlighterFuzzyQuery() throws Exception {
|
||||
assertAcked(prepareCreate("test").addMapping("type1", type1PostingsffsetsMapping()));
|
||||
ensureGreen();
|
||||
|
|
|
@ -252,7 +252,6 @@ public class MatchedQueriesIT extends ESIntegTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // fuzzy queries will be removed in 4.0
|
||||
public void testFuzzyQuerySupportsName() {
|
||||
createIndex("test1");
|
||||
ensureGreen();
|
||||
|
|
|
@ -72,7 +72,6 @@ public class RandomQueryGenerator {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // fuzzy queries will be removed in 4.0
|
||||
private static QueryBuilder randomTerminalQuery(List<String> stringFields, List<String> numericFields, int numDocs) {
|
||||
switch (randomIntBetween(0,6)) {
|
||||
case 0:
|
||||
|
@ -196,7 +195,6 @@ public class RandomQueryGenerator {
|
|||
return q;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // fuzzy queries will be removed in 4.0
|
||||
@Deprecated
|
||||
private static QueryBuilder randomFuzzyQuery(List<String> fields) {
|
||||
|
||||
|
|
|
@ -1440,7 +1440,6 @@ public class SearchQueryIT extends ESIntegTestCase {
|
|||
assertHitCount(searchResponse, 3L);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // fuzzy queries will be removed in 4.0
|
||||
public void testSpanMultiTermQuery() throws IOException {
|
||||
createIndex("test");
|
||||
|
||||
|
|
|
@ -185,7 +185,6 @@ public class GeoDistanceSortBuilderIT extends ESIntegTestCase {
|
|||
builder.endObject();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void testManyToManyGeoPointsWithDifferentFormats() throws ExecutionException, InterruptedException, IOException {
|
||||
/** q d1 d2
|
||||
* |4 o| x | x
|
||||
|
|
|
@ -212,7 +212,6 @@ public class SimpleValidateQueryIT extends ESIntegTestCase {
|
|||
assertThat(validateQueryResponse.getQueryExplanation().get(0).getExplanation(), containsString("field:\"foo (one* two*)\""));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // fuzzy queries will be removed in 4.0
|
||||
public void testExplainWithRewriteValidateQuery() throws Exception {
|
||||
client().admin().indices().prepareCreate("test")
|
||||
.addMapping("type1", "field", "type=text,analyzer=whitespace")
|
||||
|
|
|
@ -46,7 +46,6 @@ public class IcuCollationTokenFilterFactory extends AbstractTokenFilterFactory {
|
|||
|
||||
private final Collator collator;
|
||||
|
||||
@SuppressWarnings("deprecation") // Intentionally sets deprecated options for backwards compatibility
|
||||
public IcuCollationTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) {
|
||||
super(indexSettings, name, settings);
|
||||
|
||||
|
@ -167,7 +166,6 @@ public class IcuCollationTokenFilterFactory extends AbstractTokenFilterFactory {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation") // Constructs a deprecated filter for backwards compatibility
|
||||
public TokenStream create(TokenStream tokenStream) {
|
||||
return new ICUCollationKeyFilter(tokenStream, collator);
|
||||
}
|
||||
|
|
|
@ -427,7 +427,6 @@ public class AttachmentMapper extends FieldMapper {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation") // https://github.com/elastic/elasticsearch/issues/15843
|
||||
public Mapper parse(ParseContext context) throws IOException {
|
||||
byte[] content = null;
|
||||
String contentType = null;
|
||||
|
|
|
@ -29,7 +29,6 @@ import java.nio.file.FileSystem;
|
|||
public class PathUtilsForTesting {
|
||||
|
||||
/** Sets a new default filesystem for testing */
|
||||
@SuppressWarnings("deprecation") // https://github.com/elastic/elasticsearch/issues/15845
|
||||
public static void setup() {
|
||||
installMock(LuceneTestCase.getBaseTempDirForTestClass().getFileSystem());
|
||||
}
|
||||
|
|
|
@ -1033,7 +1033,6 @@ public final class InternalTestCluster extends TestCluster {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // https://github.com/elastic/elasticsearch/issues/15844
|
||||
private void randomlyResetClients() throws IOException {
|
||||
// only reset the clients on nightly tests, it causes heavy load...
|
||||
if (RandomizedTest.isNightly() && rarely(random)) {
|
||||
|
|
|
@ -113,7 +113,6 @@ public class MockFSDirectoryService extends FsDirectoryService {
|
|||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // https://github.com/elastic/elasticsearch/issues/15846
|
||||
public static void checkIndex(ESLogger logger, Store store, ShardId shardId) {
|
||||
if (store.tryIncRef()) {
|
||||
logger.info("start check index");
|
||||
|
|
Loading…
Reference in New Issue