LUCENE-7077: fail precommit on useless assignment

This commit is contained in:
Robert Muir 2016-03-08 06:42:35 -05:00
parent 5bb072d4b9
commit bfd58bc9de
3 changed files with 3 additions and 3 deletions

View File

@ -167,7 +167,7 @@ public class FSTTermsWriter extends FieldsConsumer {
FieldInfo fieldInfo = fieldInfos.fieldInfo(field); FieldInfo fieldInfo = fieldInfos.fieldInfo(field);
boolean hasFreq = fieldInfo.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS) >= 0; boolean hasFreq = fieldInfo.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS) >= 0;
TermsEnum termsEnum = terms.iterator(); TermsEnum termsEnum = terms.iterator();
TermsWriter termsWriter = termsWriter = new TermsWriter(fieldInfo); TermsWriter termsWriter = new TermsWriter(fieldInfo);
long sumTotalTermFreq = 0; long sumTotalTermFreq = 0;
long sumDocFreq = 0; long sumDocFreq = 0;

View File

@ -51,7 +51,7 @@ org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=ignore org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=ignore org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=ignore
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nullReference=ignore org.eclipse.jdt.core.compiler.problem.nullReference=ignore

View File

@ -299,7 +299,7 @@ public class DirectUpdateHandlerTest extends SolrTestCaseJ4 {
assertU(commit("expungeDeletes","true")); assertU(commit("expungeDeletes","true"));
sr = req("q","foo"); sr = req("q","foo");
r = r = sr.getSearcher().getIndexReader(); r = sr.getSearcher().getIndexReader();
assertEquals(r.maxDoc(), r.numDocs()); // no deletions assertEquals(r.maxDoc(), r.numDocs()); // no deletions
assertEquals(4,r.maxDoc()); // no dups assertEquals(4,r.maxDoc()); // no dups
sr.close(); sr.close();