lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject [10/48] lucene-solr:jira/http2: Fix 'redundant cast to long' warning in TestTieredMergePolicy.
Date Mon, 06 Aug 2018 04:15:43 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/1a870876
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1a870876
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1a870876

Branch: refs/heads/jira/http2
Commit: 1a870876c24a78c2da8f1222c7d69b90791ccacb
Parents: 8a44828
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:29:50 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/1a870876/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