Author: jleroux
Date: Sun Nov 17 10:39:20 2013
New Revision: 1542697
URL: http://svn.apache.org/r1542697
Log:
No functional change.
This did not make sense: the pattern was compiled and then the string compiled
was retrieved.
Also removes 2 trailing blanks
Modified:
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java
Modified:
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java?rev=1542697&r1=1542696&r2=1542697&view=diff
==============================================================================
---
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java
(original)
+++
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java
Sun Nov 17 10:39:20 2013
@@ -23,7 +23,6 @@ import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;
import java.util.Random;
-import java.util.regex.Pattern;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilDateTime;
@@ -71,7 +70,7 @@ public class FinAccountHelper {
/**
* A convenience method which adds transactions.get(0).get(fieldName) to
initialValue, all done in BigDecimal to decimals and rounding
- * @param initialValue the initial value
+ * @param initialValue the initial value
* @param transactions a List of GenericValue objects of transactions
* @param fieldName the field name to get the value from the transaction
* @param decimals number of decimals
@@ -140,9 +139,7 @@ public class FinAccountHelper {
if (finAccountCode == null) {
return null;
}
-
- Pattern filterRegex = Pattern.compile("[^0-9A-Z]");
- finAccountCode =
finAccountCode.toUpperCase().replaceAll(filterRegex.pattern(), "");
+ finAccountCode = finAccountCode.toUpperCase().replaceAll("[^0-9A-Z]",
"");
// now we need to get the encrypted version of the fin account code
the user passed in to look up against FinAccount
// we do this by making a temporary generic entity with same
finAccountCode and then doing a match
@@ -212,7 +209,7 @@ public class FinAccountHelper {
* @param finAccountId the financial account id
* @param asOfDateTime the validity date
* @param delegator the delegator
- * @return returns the net balance (see above) minus the sum of all
authorization amounts which are not expired
+ * @return returns the net balance (see above) minus the sum of all
authorization amounts which are not expired
* @throws GenericEntityException
*/
public static BigDecimal getAvailableBalance(String finAccountId,
Timestamp asOfDateTime, Delegator delegator) throws GenericEntityException {