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:
Jason Tedor 2016-05-25 17:15:36 -04:00
parent 718344f69b
commit 9d39b05845
16 changed files with 0 additions and 18 deletions

View File

@ -32,7 +32,6 @@ import java.io.IOException;
/** /**
*/ */
@SuppressWarnings("deprecation")
public class Version { 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 * 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

View File

@ -34,7 +34,6 @@ import java.util.Set;
/** /**
* *
*/ */
@SuppressWarnings("deprecation")
public class StopTokenFilterFactory extends AbstractTokenFilterFactory { public class StopTokenFilterFactory extends AbstractTokenFilterFactory {
private final CharArraySet stopWords; private final CharArraySet stopWords;

View File

@ -129,7 +129,6 @@ public class FsDirectoryService extends DirectoryService implements StoreRateLim
throw new IllegalArgumentException("No directory found for type [" + storeType + "]"); throw new IllegalArgumentException("No directory found for type [" + storeType + "]");
} }
@SuppressWarnings("deprecation")
private static boolean isDefault(String storeType) { private static boolean isDefault(String storeType) {
return IndexModule.Type.DEFAULT.match(storeType); return IndexModule.Type.DEFAULT.match(storeType);
} }

View File

@ -821,7 +821,6 @@ public class Store extends AbstractIndexShardComponent implements Closeable, Ref
final SegmentInfos segmentCommitInfos = Store.readSegmentsInfo(commit, directory); final SegmentInfos segmentCommitInfos = Store.readSegmentsInfo(commit, directory);
numDocs = Lucene.getNumDocs(segmentCommitInfos); numDocs = Lucene.getNumDocs(segmentCommitInfos);
commitUserDataBuilder.putAll(segmentCommitInfos.getUserData()); 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. Version maxVersion = segmentCommitInfos.getMinSegmentLuceneVersion(); // we don't know which version was used to write so we take the max version.
for (SegmentCommitInfo info : segmentCommitInfos) { for (SegmentCommitInfo info : segmentCommitInfos) {
final Version version = info.info.getVersion(); final Version version = info.info.getVersion();

View File

@ -138,7 +138,6 @@ public class QueryDSLDocumentationTests extends ESTestCase {
functionScoreQuery(functions); functionScoreQuery(functions);
} }
@SuppressWarnings("deprecation") // fuzzy queries will be removed in 4.0
public void testFuzzy() { public void testFuzzy() {
fuzzyQuery("name", "kimchy"); fuzzyQuery("name", "kimchy");
} }

View File

@ -2269,7 +2269,6 @@ public class HighlighterSearchIT extends ESIntegTestCase {
} }
@SuppressWarnings("deprecation") // fuzzy queries will be removed in 4.0
public void testPostingsHighlighterFuzzyQuery() throws Exception { public void testPostingsHighlighterFuzzyQuery() throws Exception {
assertAcked(prepareCreate("test").addMapping("type1", type1PostingsffsetsMapping())); assertAcked(prepareCreate("test").addMapping("type1", type1PostingsffsetsMapping()));
ensureGreen(); ensureGreen();

View File

@ -252,7 +252,6 @@ public class MatchedQueriesIT extends ESIntegTestCase {
} }
} }
@SuppressWarnings("deprecation") // fuzzy queries will be removed in 4.0
public void testFuzzyQuerySupportsName() { public void testFuzzyQuerySupportsName() {
createIndex("test1"); createIndex("test1");
ensureGreen(); ensureGreen();

View File

@ -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) { private static QueryBuilder randomTerminalQuery(List<String> stringFields, List<String> numericFields, int numDocs) {
switch (randomIntBetween(0,6)) { switch (randomIntBetween(0,6)) {
case 0: case 0:
@ -196,7 +195,6 @@ public class RandomQueryGenerator {
return q; return q;
} }
@SuppressWarnings("deprecation") // fuzzy queries will be removed in 4.0
@Deprecated @Deprecated
private static QueryBuilder randomFuzzyQuery(List<String> fields) { private static QueryBuilder randomFuzzyQuery(List<String> fields) {

View File

@ -1440,7 +1440,6 @@ public class SearchQueryIT extends ESIntegTestCase {
assertHitCount(searchResponse, 3L); assertHitCount(searchResponse, 3L);
} }
@SuppressWarnings("deprecation") // fuzzy queries will be removed in 4.0
public void testSpanMultiTermQuery() throws IOException { public void testSpanMultiTermQuery() throws IOException {
createIndex("test"); createIndex("test");

View File

@ -185,7 +185,6 @@ public class GeoDistanceSortBuilderIT extends ESIntegTestCase {
builder.endObject(); builder.endObject();
} }
@SuppressWarnings("deprecation")
public void testManyToManyGeoPointsWithDifferentFormats() throws ExecutionException, InterruptedException, IOException { public void testManyToManyGeoPointsWithDifferentFormats() throws ExecutionException, InterruptedException, IOException {
/** q d1 d2 /** q d1 d2
* |4 o| x | x * |4 o| x | x

View File

@ -212,7 +212,6 @@ public class SimpleValidateQueryIT extends ESIntegTestCase {
assertThat(validateQueryResponse.getQueryExplanation().get(0).getExplanation(), containsString("field:\"foo (one* two*)\"")); 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 { public void testExplainWithRewriteValidateQuery() throws Exception {
client().admin().indices().prepareCreate("test") client().admin().indices().prepareCreate("test")
.addMapping("type1", "field", "type=text,analyzer=whitespace") .addMapping("type1", "field", "type=text,analyzer=whitespace")

View File

@ -46,7 +46,6 @@ public class IcuCollationTokenFilterFactory extends AbstractTokenFilterFactory {
private final Collator collator; private final Collator collator;
@SuppressWarnings("deprecation") // Intentionally sets deprecated options for backwards compatibility
public IcuCollationTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { public IcuCollationTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) {
super(indexSettings, name, settings); super(indexSettings, name, settings);
@ -167,7 +166,6 @@ public class IcuCollationTokenFilterFactory extends AbstractTokenFilterFactory {
} }
@Override @Override
@SuppressWarnings("deprecation") // Constructs a deprecated filter for backwards compatibility
public TokenStream create(TokenStream tokenStream) { public TokenStream create(TokenStream tokenStream) {
return new ICUCollationKeyFilter(tokenStream, collator); return new ICUCollationKeyFilter(tokenStream, collator);
} }

View File

@ -427,7 +427,6 @@ public class AttachmentMapper extends FieldMapper {
} }
@Override @Override
@SuppressWarnings("deprecation") // https://github.com/elastic/elasticsearch/issues/15843
public Mapper parse(ParseContext context) throws IOException { public Mapper parse(ParseContext context) throws IOException {
byte[] content = null; byte[] content = null;
String contentType = null; String contentType = null;

View File

@ -29,7 +29,6 @@ import java.nio.file.FileSystem;
public class PathUtilsForTesting { public class PathUtilsForTesting {
/** Sets a new default filesystem for testing */ /** Sets a new default filesystem for testing */
@SuppressWarnings("deprecation") // https://github.com/elastic/elasticsearch/issues/15845
public static void setup() { public static void setup() {
installMock(LuceneTestCase.getBaseTempDirForTestClass().getFileSystem()); installMock(LuceneTestCase.getBaseTempDirForTestClass().getFileSystem());
} }

View File

@ -1033,7 +1033,6 @@ public final class InternalTestCluster extends TestCluster {
} }
} }
@SuppressWarnings("deprecation") // https://github.com/elastic/elasticsearch/issues/15844
private void randomlyResetClients() throws IOException { private void randomlyResetClients() throws IOException {
// only reset the clients on nightly tests, it causes heavy load... // only reset the clients on nightly tests, it causes heavy load...
if (RandomizedTest.isNightly() && rarely(random)) { if (RandomizedTest.isNightly() && rarely(random)) {

View File

@ -113,7 +113,6 @@ public class MockFSDirectoryService extends FsDirectoryService {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@SuppressWarnings("deprecation") // https://github.com/elastic/elasticsearch/issues/15846
public static void checkIndex(ESLogger logger, Store store, ShardId shardId) { public static void checkIndex(ESLogger logger, Store store, ShardId shardId) {
if (store.tryIncRef()) { if (store.tryIncRef()) {
logger.info("start check index"); logger.info("start check index");