NO-JIRA Fix a "Computation of average could overflow" SpotBugs warning

https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#im-computation-of-average-could-overflow-im-average-computation-could-overflow
This commit is contained in:
Jiri Danek 2019-02-14 13:22:11 +01:00
parent 441c950302
commit 6fc6787227
1 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ public class PriorityCollection<T extends PriorityAware> extends AbstractCollect
int high = current.length - 1;
while (low <= high) {
int mid = (low + high) / 2;
int mid = (low + high) >>> 1;
PriorityHolder<T> midVal = current[mid];
if (midVal.getPriority() > priority)
@ -203,7 +203,7 @@ public class PriorityCollection<T extends PriorityAware> extends AbstractCollect
int high = len - 1;
while (low <= high) {
int mid = (low + high) / 2;
int mid = (low + high) >>> 1;
PriorityHolder<T> midVal = current[mid];
if (midVal.getPriority() > priority)