From commits-return-55107-archive-asf-public=cust-asf.ponee.io@activemq.apache.org Thu Feb 14 13:42:42 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A3F24180626 for ; Thu, 14 Feb 2019 14:42:41 +0100 (CET) Received: (qmail 98843 invoked by uid 500); 14 Feb 2019 13:42:40 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 98834 invoked by uid 99); 14 Feb 2019 13:42:40 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2019 13:42:40 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 3BABF82F14; Thu, 14 Feb 2019 13:42:40 +0000 (UTC) Date: Thu, 14 Feb 2019 13:42:40 +0000 To: "commits@activemq.apache.org" Subject: [activemq-artemis] branch master updated: NO-JIRA Fix a "Computation of average could overflow" SpotBugs warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <155015175999.4604.3603107289877831747@gitbox.apache.org> From: michaelpearce@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: activemq-artemis X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 441c95030236aeac87455a15e36a9651c324aa8e X-Git-Newrev: 6fc6787227c11947abf7ef9605a7f2f99ccee987 X-Git-Rev: 6fc6787227c11947abf7ef9605a7f2f99ccee987 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. michaelpearce pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git The following commit(s) were added to refs/heads/master by this push: new 6fc6787 NO-JIRA Fix a "Computation of average could overflow" SpotBugs warning new 603d72f This closes #2550 6fc6787 is described below commit 6fc6787227c11947abf7ef9605a7f2f99ccee987 Author: Jiri Danek AuthorDate: Thu Feb 14 13:22:11 2019 +0100 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 --- .../apache/activemq/artemis/utils/collections/PriorityCollection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/PriorityCollection.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/PriorityCollection.java index fb96f0b..265b27a 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/PriorityCollection.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/PriorityCollection.java @@ -135,7 +135,7 @@ public class PriorityCollection extends AbstractCollect int high = current.length - 1; while (low <= high) { - int mid = (low + high) / 2; + int mid = (low + high) >>> 1; PriorityHolder midVal = current[mid]; if (midVal.getPriority() > priority) @@ -203,7 +203,7 @@ public class PriorityCollection extends AbstractCollect int high = len - 1; while (low <= high) { - int mid = (low + high) / 2; + int mid = (low + high) >>> 1; PriorityHolder midVal = current[mid]; if (midVal.getPriority() > priority)