mirror of https://github.com/apache/lucene.git
Fix 'redundant cast to long' warning in TestTieredMergePolicy.
This commit is contained in:
parent
8a4482805b
commit
1a870876c2
|
@ -54,7 +54,7 @@ public class TestTieredMergePolicy extends BaseMergePolicyTestCase {
|
||||||
totalMaxDoc += sci.info.maxDoc();
|
totalMaxDoc += sci.info.maxDoc();
|
||||||
long byteSize = sci.sizeInBytes();
|
long byteSize = sci.sizeInBytes();
|
||||||
double liveRatio = 1 - (double) sci.getDelCount() / sci.info.maxDoc();
|
double liveRatio = 1 - (double) sci.getDelCount() / sci.info.maxDoc();
|
||||||
long weightedByteSize = (long) Math.round(liveRatio * byteSize);
|
long weightedByteSize = Math.round(liveRatio * byteSize);
|
||||||
totalBytes += weightedByteSize;
|
totalBytes += weightedByteSize;
|
||||||
minSegmentBytes = Math.min(minSegmentBytes, weightedByteSize);
|
minSegmentBytes = Math.min(minSegmentBytes, weightedByteSize);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue