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:
Daniel Naber 2004-08-25 12:06:14 +00:00
parent c379561d85
commit 35dc428ed9
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}