From 1a870876c24a78c2da8f1222c7d69b90791ccacb Mon Sep 17 00:00:00 2001 From: Christine Poerschke Date: Tue, 31 Jul 2018 18:55:34 +0100 Subject: [PATCH] Fix 'redundant cast to long' warning in TestTieredMergePolicy. --- .../src/test/org/apache/lucene/index/TestTieredMergePolicy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lucene/core/src/test/org/apache/lucene/index/TestTieredMergePolicy.java b/lucene/core/src/test/org/apache/lucene/index/TestTieredMergePolicy.java index a7f21111c9d..b4a7ff5588f 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestTieredMergePolicy.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestTieredMergePolicy.java @@ -54,7 +54,7 @@ public class TestTieredMergePolicy extends BaseMergePolicyTestCase { totalMaxDoc += sci.info.maxDoc(); long byteSize = sci.sizeInBytes(); double liveRatio = 1 - (double) sci.getDelCount() / sci.info.maxDoc(); - long weightedByteSize = (long) Math.round(liveRatio * byteSize); + long weightedByteSize = Math.round(liveRatio * byteSize); totalBytes += weightedByteSize; minSegmentBytes = Math.min(minSegmentBytes, weightedByteSize); }