From 16094d84d546c07ca0af413273f0d86a88aebb50 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 9 Apr 2013 17:52:50 -0500 Subject: [PATCH] IDEMPIERE-455 Discover and fix FindBugs problems / DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE --- org.adempiere.base/src/org/compiere/model/MAllocationHdr.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MAllocationHdr.java b/org.adempiere.base/src/org/compiere/model/MAllocationHdr.java index 17c17b148e..bbfc21cd22 100644 --- a/org.adempiere.base/src/org/compiere/model/MAllocationHdr.java +++ b/org.adempiere.base/src/org/compiere/model/MAllocationHdr.java @@ -57,7 +57,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction private static final long serialVersionUID = 8726957992840702609L; /** Tolerance Gain and Loss */ - private static final BigDecimal TOLERANCE = new BigDecimal (0.02); + private static final BigDecimal TOLERANCE = BigDecimal.valueOf(0.02); /** * Get Allocations of Payment @@ -1045,7 +1045,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction // allocation as a percentage of the invoice double multiplier = allocAmt.doubleValue() / invoice.getGrandTotal().doubleValue(); // Reduce Orig Invoice Accounted - invAmtAccted = invAmtAccted.multiply(new BigDecimal(multiplier)); + invAmtAccted = invAmtAccted.multiply(BigDecimal.valueOf(multiplier)); // Difference based on percentage of Orig Invoice openBalanceDiff = openBalanceDiff.add(invAmtAccted).subtract(allocAmtAccted); // gain is negative // ignore Tolerance