Author: mbrohl
Date: Mon Dec 18 14:06:38 2017
New Revision: 1818570
URL:
http://svn.apache.org/viewvc?rev=1818570&view=revLog:
Improved: General refactoring and code improvements, package
org.apache.ofbiz.order.thirdparty.zipsales.
(OFBIZ-9737)
Thanks Julian Leichert for reporting and providing the patch.
Modified:
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java
Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java?rev=1818570&r1=1818569&r2=1818570&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/zipsales/ZipSalesServices.java Mon Dec 18 14:06:38 2017
@@ -62,7 +62,7 @@ public class ZipSalesServices {
public static final String resource_error = "OrderErrorUiLabels";
// date formatting
- private static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
+ private static final String DATE_PATTERN = "yyyyMMdd";
// import table service
public static Map<String, Object> importFlatTable(DispatchContext dctx, Map<String, ? extends Object> context) {
@@ -278,6 +278,7 @@ public class ZipSalesServices {
}
// the filtered list
+ // TODO: taxLookup is always null, so filter by County will never be executed
List<GenericValue> taxLookup = null;
// only do filtering if there are more then one zip code found
@@ -484,6 +485,7 @@ public class ZipSalesServices {
// formatting methods
private static Timestamp parseDate(String dateString, Timestamp useWhenNull) {
Timestamp ts = null;
+ SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_PATTERN);
if (dateString != null) {
try {
ts = new Timestamp(dateFormat.parse(dateString).getTime());