Skip to content

Commit 8908571

Browse files
author
Isabel Drost-Fromm
committed
Cleaning up use of generics.
1 parent 5a26218 commit 8908571

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/test/java/org/elasticsearch/index/query/BaseQueryTestCase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
public abstract class BaseQueryTestCase<QB extends BaseQueryBuilder & Streamable> extends ElasticsearchTestCase {
6565

6666
private static Injector injector;
67-
protected static IndexQueryParserService queryParserService;
68-
protected static Index index;
67+
private static IndexQueryParserService queryParserService;
68+
private static Index index;
6969

7070
protected QB testQuery = createTestQueryBuilder();
7171

src/test/java/org/elasticsearch/index/query/BaseTermQueryTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ public Object createRandomValueObject() {
5454
return value;
5555
}
5656

57-
protected abstract BaseTermQueryBuilder getBuilderInstance(String fieldName, Object value);
57+
protected abstract QB getBuilderInstance(String fieldName, Object value);
5858

5959
@Test
6060
public void testValidate() throws QueryParsingException, IOException {
6161

62-
BaseTermQueryBuilder queryBuilder = getBuilderInstance("all", "good");
62+
QB queryBuilder = getBuilderInstance("all", "good");
6363
assertNull(queryBuilder.validate());
6464

6565
queryBuilder = getBuilderInstance(null, "Term");

src/test/java/org/elasticsearch/index/query/SpanTermQueryBuilderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected SpanTermQueryBuilder createEmptyQueryBuilder() {
3838
}
3939

4040
@Override
41-
protected BaseTermQueryBuilder getBuilderInstance(String fieldName, Object value) {
41+
protected SpanTermQueryBuilder getBuilderInstance(String fieldName, Object value) {
4242
return new SpanTermQueryBuilder(fieldName, value);
4343
}
4444

src/test/java/org/elasticsearch/index/query/TermQueryBuilderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected TermQueryBuilder createEmptyQueryBuilder() {
3838
}
3939

4040
@Override
41-
protected BaseTermQueryBuilder getBuilderInstance(String fieldName, Object value) {
41+
protected TermQueryBuilder getBuilderInstance(String fieldName, Object value) {
4242
return new TermQueryBuilder(fieldName, value);
4343
}
4444

0 commit comments

Comments
 (0)