Author: jacopoc
Date: Mon Dec 4 09:53:16 2006 New Revision: 482264 URL: http://svn.apache.org/viewvc?view=rev&rev=482264 Log: Applied patch from Stefan Huehner (OFBIZ-515) to fix string comparisons; plus some other formatting fixes. Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java incubator/ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/LoadSale.java incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/SelectProduct.java Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?view=diff&rev=482264&r1=482263&r2=482264 ============================================================================== --- incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original) +++ incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Mon Dec 4 09:53:16 2006 @@ -953,7 +953,7 @@ if (termDays != null) { lTermDays = new Long(termDays); } - if ((termIndex != null) && (termIndex != "-1") && (UtilValidate.isInteger(termIndex))) { + if ((termIndex != null) && (!"-1".equals(termIndex)) && (UtilValidate.isInteger(termIndex))) { cartHelper.removeOrderTerm(Integer.parseInt(termIndex)); } Modified: incubator/ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java?view=diff&rev=482264&r1=482263&r2=482264 ============================================================================== --- incubator/ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java (original) +++ incubator/ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java Mon Dec 4 09:53:16 2006 @@ -132,10 +132,11 @@ public void setup(String startupFile) { String xuiProps = System.getProperty("ofbiz.home") + "/specialpurpose/pos/config/" + startupFile; String suffix = Locale.getDefault().getLanguage(); - if ("en" == suffix ) + if ("en".equals(suffix)) { suffix = ""; - else - suffix = "_" + suffix; + } else { + suffix = "_" + suffix; + } UtilProperties.setPropertyValue(xuiProps, "Language", "XuiLabels" + suffix); JFrame frame = new JFrame(); frame.setUndecorated(true); Modified: incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/LoadSale.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/LoadSale.java?view=diff&rev=482264&r1=482263&r2=482264 ============================================================================== --- incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/LoadSale.java (original) +++ incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/LoadSale.java Mon Dec 4 09:53:16 2006 @@ -196,7 +196,7 @@ Object o = i.next(); Map.Entry entry = (Map.Entry)o; String val = entry.getValue().toString(); - if (val == sale) { + if (val.equals(sale)) { saleSelected = entry.getKey().toString(); } } Modified: incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/SelectProduct.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/SelectProduct.java?view=diff&rev=482264&r1=482263&r2=482264 ============================================================================== --- incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/SelectProduct.java (original) +++ incubator/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/SelectProduct.java Mon Dec 4 09:53:16 2006 @@ -113,7 +113,7 @@ Object o = i.next(); Map.Entry entry = (Map.Entry)o; String val = entry.getValue().toString(); - if (val == product) { + if (val.equals(product)) { m_productIdSelected = entry.getKey().toString(); } } |
Free forum by Nabble | Edit this page |