From 7ba478f6c2623da2a184048241d41ba8df7dab8e Mon Sep 17 00:00:00 2001 From: Richard Morales Date: Wed, 12 Dec 2012 16:31:08 -0500 Subject: [PATCH] IDEMPIERE-455 Discover and fix FindBugs problems / Pattern ICAST_IDIV_CAST_TO_DOUBLE --- .../src/org/compiere/print/layout/TableElement.java | 2 +- org.adempiere.base/src/org/compiere/util/WebUtil.java | 4 ++-- .../src/main/servlet/org/compiere/web/AdempiereMonitor.java | 2 +- .../src/org/compiere/wstore/RfQServlet.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/print/layout/TableElement.java b/org.adempiere.base/src/org/compiere/print/layout/TableElement.java index 7b44cde779..37bd630c35 100644 --- a/org.adempiere.base/src/org/compiere/print/layout/TableElement.java +++ b/org.adempiere.base/src/org/compiere/print/layout/TableElement.java @@ -284,7 +284,7 @@ public class TableElement extends PrintElement m_printRows = new SerializableMatrixImpl>("TableElementPrintRows"); // reset // Max Column Width = 50% of available width (used if maxWidth not set) - float dynMxColumnWidth = m_firstPage.width / 2; + float dynMxColumnWidth = m_firstPage.width / (float)2; // Width calculation int rows = m_data.getRowCount(); diff --git a/org.adempiere.base/src/org/compiere/util/WebUtil.java b/org.adempiere.base/src/org/compiere/util/WebUtil.java index 81e7d6db7b..6852a97529 100644 --- a/org.adempiere.base/src/org/compiere/util/WebUtil.java +++ b/org.adempiere.base/src/org/compiere/util/WebUtil.java @@ -962,7 +962,7 @@ public final class WebUtil out.close(); // time = System.currentTimeMillis() - time; - double speed = (fileLength/1024) / ((double)time/1000); + double speed = (fileLength/(double)1024) / (time/(double)1000); log.info("Length=" + fileLength + " - " + time + " ms - " @@ -1015,7 +1015,7 @@ public final class WebUtil in.close(); // time = System.currentTimeMillis() - time; - double speed = (fileLength/1024) / ((double)time/1000); + double speed = (fileLength/(double)1024) / (time/(double)1000); log.info("Length=" + fileLength + " - " + time + " ms - " diff --git a/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitor.java b/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitor.java index f83eb0371a..ed7a7eb72e 100644 --- a/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitor.java +++ b/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitor.java @@ -446,7 +446,7 @@ public class AdempiereMonitor extends HttpServlet fis.close(); // time = System.currentTimeMillis() - time; - double speed = (fileLength/1024) / ((double)time/1000); + double speed = (fileLength/(double)1024) / (time/(double)1000); log.info("length=" + fileLength + " - " + time + " ms - " diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RfQServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/RfQServlet.java index f2df4be5b3..87a0de7861 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RfQServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/RfQServlet.java @@ -182,7 +182,7 @@ public class RfQServlet extends HttpServlet out.close(); // time = System.currentTimeMillis() - time; - double speed = (fileLength/1024) / ((double)time/1000); + double speed = (fileLength/(double)1024) / (time/(double)1000); log.fine("streamInvoice - length=" + fileLength + " - " + time + " ms - "