mirror of https://github.com/apache/lucene.git
mini optimization in hasVectors: break if result is true
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150452 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c379561d85
commit
35dc428ed9
|
@ -158,8 +158,10 @@ final class FieldInfos {
|
|||
public boolean hasVectors() {
|
||||
boolean hasVectors = false;
|
||||
for (int i = 0; i < size(); i++) {
|
||||
if (fieldInfo(i).storeTermVector)
|
||||
if (fieldInfo(i).storeTermVector) {
|
||||
hasVectors = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return hasVectors;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue