mirror of https://github.com/apache/lucene.git
LUCENE-5950: These 2 hacks are still needed to make the whole thing to compile in Eclipse's compiler (IDE)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1640874 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c54d9a8f7f
commit
0f35178bee
|
@ -113,7 +113,9 @@ public class TestPrefixCodedTerms extends LuceneTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
Iterator<Term> expected = superSet.iterator();
|
Iterator<Term> expected = superSet.iterator();
|
||||||
Iterator<Term> actual = new MergedIterator<>(subs.toArray(new Iterator[0]));
|
// NOTE: currenlty using diamond operator on MergedIterator (without explicit Term class) causes
|
||||||
|
// errors on Eclipse Compiler (ecj) used for javadoc lint
|
||||||
|
Iterator<Term> actual = new MergedIterator<Term>(subs.toArray(new Iterator[0]));
|
||||||
while (actual.hasNext()) {
|
while (actual.hasNext()) {
|
||||||
assertTrue(expected.hasNext());
|
assertTrue(expected.hasNext());
|
||||||
assertEquals(expected.next(), actual.next());
|
assertEquals(expected.next(), actual.next());
|
||||||
|
|
|
@ -315,7 +315,9 @@ public class TestGrouping extends LuceneTestCase {
|
||||||
BytesRef groupValue = mvalGd.groupValue.exists() ? ((MutableValueStr) mvalGd.groupValue).value.get() : null;
|
BytesRef groupValue = mvalGd.groupValue.exists() ? ((MutableValueStr) mvalGd.groupValue).value.get() : null;
|
||||||
groups.add(new GroupDocs<>(Float.NaN, mvalGd.maxScore, mvalGd.totalHits, mvalGd.scoreDocs, groupValue, mvalGd.groupSortValues));
|
groups.add(new GroupDocs<>(Float.NaN, mvalGd.maxScore, mvalGd.totalHits, mvalGd.scoreDocs, groupValue, mvalGd.groupSortValues));
|
||||||
}
|
}
|
||||||
return new TopGroups<>(mvalTopGroups.groupSort, mvalTopGroups.withinGroupSort, mvalTopGroups.totalHitCount, mvalTopGroups.totalGroupedHitCount, groups.toArray(new GroupDocs[groups.size()]), Float.NaN);
|
// NOTE: currenlty using diamond operator on MergedIterator (without explicit Term class) causes
|
||||||
|
// errors on Eclipse Compiler (ecj) used for javadoc lint
|
||||||
|
return new TopGroups<BytesRef>(mvalTopGroups.groupSort, mvalTopGroups.withinGroupSort, mvalTopGroups.totalHitCount, mvalTopGroups.totalGroupedHitCount, groups.toArray(new GroupDocs[groups.size()]), Float.NaN);
|
||||||
}
|
}
|
||||||
fail();
|
fail();
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -59,7 +59,9 @@ public final class MaxFieldValueUpdateProcessorFactory extends FieldValueSubsetU
|
||||||
public Collection pickSubset(Collection values) {
|
public Collection pickSubset(Collection values) {
|
||||||
Collection result = values;
|
Collection result = values;
|
||||||
try {
|
try {
|
||||||
result = Collections.singletonList(Collections.max(values));
|
// NOTE: the extra cast to Object is needed to prevent compile
|
||||||
|
// errors on Eclipse Compiler (ecj) used for javadoc lint
|
||||||
|
result = Collections.singletonList((Object) Collections.max(values));
|
||||||
} catch (ClassCastException e) {
|
} catch (ClassCastException e) {
|
||||||
throw new SolrException
|
throw new SolrException
|
||||||
(BAD_REQUEST,
|
(BAD_REQUEST,
|
||||||
|
|
|
@ -59,7 +59,9 @@ public final class MinFieldValueUpdateProcessorFactory extends FieldValueSubsetU
|
||||||
public Collection pickSubset(Collection values) {
|
public Collection pickSubset(Collection values) {
|
||||||
Collection result = values;
|
Collection result = values;
|
||||||
try {
|
try {
|
||||||
result = Collections.singletonList(Collections.min(values));
|
// NOTE: the extra cast to Object is needed to prevent compile
|
||||||
|
// errors on Eclipse Compiler (ecj) used for javadoc lint
|
||||||
|
result = Collections.singletonList((Object) Collections.min(values));
|
||||||
} catch (ClassCastException e) {
|
} catch (ClassCastException e) {
|
||||||
throw new SolrException
|
throw new SolrException
|
||||||
(BAD_REQUEST,
|
(BAD_REQUEST,
|
||||||
|
|
Loading…
Reference in New Issue