lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cpoersc...@apache.org
Subject [3/3] lucene-solr:branch_7x: Fix 'redundant cast to long' warning in TestTieredMergePolicy.
Date Tue, 31 Jul 2018 18:50:46 GMT
Fix 'redundant cast to long' warning in TestTieredMergePolicy.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/4a86e00b
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/4a86e00b
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/4a86e00b

Branch: refs/heads/branch_7x
Commit: 4a86e00b76c16f1830311e99a1d59c0760be484d
Parents: d19ac7c
Author: Christine Poerschke <cpoerschke@apache.org>
Authored: Tue Jul 31 18:55:34 2018 +0100
Committer: Christine Poerschke <cpoerschke@apache.org>
Committed: Tue Jul 31 19:31:56 2018 +0100

----------------------------------------------------------------------
 .../src/test/org/apache/lucene/index/TestTieredMergePolicy.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a86e00b/lucene/core/src/test/org/apache/lucene/index/TestTieredMergePolicy.java
----------------------------------------------------------------------
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 a7f2111..b4a7ff5 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);
     }


Mime
View raw message