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:
Uwe Schindler 2014-11-21 08:10:23 +00:00
parent c54d9a8f7f
commit 0f35178bee
4 changed files with 12 additions and 4 deletions

View File

@ -113,7 +113,9 @@ public class TestPrefixCodedTerms extends LuceneTestCase {
}
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()) {
assertTrue(expected.hasNext());
assertEquals(expected.next(), actual.next());

View File

@ -315,7 +315,9 @@ public class TestGrouping extends LuceneTestCase {
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));
}
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();
return null;

View File

@ -59,7 +59,9 @@ public final class MaxFieldValueUpdateProcessorFactory extends FieldValueSubsetU
public Collection pickSubset(Collection values) {
Collection result = values;
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) {
throw new SolrException
(BAD_REQUEST,

View File

@ -59,7 +59,9 @@ public final class MinFieldValueUpdateProcessorFactory extends FieldValueSubsetU
public Collection pickSubset(Collection values) {
Collection result = values;
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) {
throw new SolrException
(BAD_REQUEST,