Author: jleroux
Date: Wed Nov 22 10:57:48 2017 New Revision: 1816034 URL: http://svn.apache.org/viewvc?rev=1816034&view=rev Log: No functional change, these "WIP" should not have been committed with r1816033 Modified: ofbiz/ofbiz-plugins/trunk/example/groovyScripts/PrepareLocalesForDropDown.groovy ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/ProductUtil.java Modified: ofbiz/ofbiz-plugins/trunk/example/groovyScripts/PrepareLocalesForDropDown.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/example/groovyScripts/PrepareLocalesForDropDown.groovy?rev=1816034&r1=1816033&r2=1816034&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/example/groovyScripts/PrepareLocalesForDropDown.groovy (original) +++ ofbiz/ofbiz-plugins/trunk/example/groovyScripts/PrepareLocalesForDropDown.groovy Wed Nov 22 10:57:48 2017 @@ -20,5 +20,3 @@ under the License. def localeMap = [] org.apache.ofbiz.base.util.UtilMisc.availableLocales().each { localeMap.add(localeId:it.toString()) } parameters.localeList = localeMap - -EntityQuery.use(delegator).from("ExampleTypeView").queryList() \ No newline at end of file Modified: ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/ProductUtil.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/ProductUtil.java?rev=1816034&r1=1816033&r2=1816034&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/ProductUtil.java (original) +++ ofbiz/ofbiz-plugins/trunk/solr/src/main/java/org/apache/ofbiz/solr/ProductUtil.java Wed Nov 22 10:57:48 2017 @@ -19,7 +19,6 @@ package org.apache.ofbiz.solr; import java.math.BigDecimal; -import java.math.RoundingMode; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -200,21 +199,21 @@ public final class ProductUtil { if (product != null && "AGGREGATED".equals(product.getString("productTypeId"))) { ProductConfigWrapper configWrapper = new ProductConfigWrapper(delegator, dispatcher, productId, null, null, null, null, locale, userLogin); - String listPrice = configWrapper.getTotalListPrice().setScale(2, RoundingMode.HALF_DOWN).toString(); + String listPrice = configWrapper.getTotalListPrice().setScale(2, BigDecimal.ROUND_HALF_DOWN).toString(); if (listPrice != null) dispatchContext.put("listPrice", listPrice); - String defaultPrice = configWrapper.getTotalListPrice().setScale(2, RoundingMode.HALF_DOWN).toString(); + String defaultPrice = configWrapper.getTotalListPrice().setScale(2, BigDecimal.ROUND_HALF_DOWN).toString(); if (defaultPrice != null) dispatchContext.put("defaultPrice", defaultPrice); } else { Map<String, GenericValue> priceContext = UtilMisc.toMap("product", product); Map<String, Object> priceMap = dispatcher.runSync("calculateProductPrice", priceContext); if (priceMap.get("listPrice") != null) { - String listPrice = ((BigDecimal) priceMap.get("listPrice")).setScale(2, RoundingMode.HALF_DOWN).toString(); + String listPrice = ((BigDecimal) priceMap.get("listPrice")).setScale(2, BigDecimal.ROUND_HALF_DOWN).toString(); dispatchContext.put("listPrice", listPrice); } if (priceMap.get("defaultPrice") != null) { - String defaultPrice = ((BigDecimal) priceMap.get("defaultPrice")).setScale(2, RoundingMode.HALF_DOWN).toString(); + String defaultPrice = ((BigDecimal) priceMap.get("defaultPrice")).setScale(2, BigDecimal.ROUND_HALF_DOWN).toString(); if (defaultPrice != null) dispatchContext.put("defaultPrice", defaultPrice); } |
Free forum by Nabble | Edit this page |