Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java Fri Mar 6 17:31:13 2009 @@ -206,7 +206,7 @@ // set the order name String orderName = orh.getOrderName(); - if (orderName != null){ + if (orderName != null) { cart.setOrderName(orderName); } @@ -367,7 +367,7 @@ Debug.logError(e, module); } } - if (workEffort != null && "ASSET_USAGE".equals(workEffort.getString("workEffortTypeId"))){ + if (workEffort != null && "ASSET_USAGE".equals(workEffort.getString("workEffortTypeId"))) { reservStart = workEffort.getTimestamp("estimatedStartDate"); reservLength = OrderReadHelper.getWorkEffortRentalLength(workEffort); reservPersons = workEffort.getBigDecimal("reservPersons"); @@ -461,8 +461,8 @@ cart.setPoNumber(item.getString("correspondingPoId")); List<GenericValue> itemAdjustments = orh.getOrderItemAdjustments(item); - if(itemAdjustments != null){ - for(GenericValue itemAdjustment : itemAdjustments){ + if(itemAdjustments != null) { + for(GenericValue itemAdjustment : itemAdjustments) { cartItem.addAdjustment(itemAdjustment); } } @@ -571,7 +571,7 @@ // create the cart ShoppingCart cart = new ShoppingCart(delegator, productStoreId, locale, currency); // set shopping cart type - if ("PURCHASE_QUOTE".equals(quote.getString("quoteTypeId"))){ + if ("PURCHASE_QUOTE".equals(quote.getString("quoteTypeId"))) { cart.setOrderType("PURCHASE_ORDER"); cart.setBillFromVendorPartyId(quote.getString("partyId")); } @@ -919,11 +919,11 @@ return result; } - public static Map<String, Object>getShoppingCartData(DispatchContext dctx, Map<String, Object> context){ + public static Map<String, Object>getShoppingCartData(DispatchContext dctx, Map<String, Object> context) { Map<String, Object> result = ServiceUtil.returnSuccess(); Locale locale = (Locale) context.get("locale"); ShoppingCart shoppingCart = (ShoppingCart) context.get("shoppingCart"); - if(shoppingCart != null){ + if(shoppingCart != null) { String isoCode = shoppingCart.getCurrency(); result.put("totalQuantity", shoppingCart.getTotalQuantity()); result.put("currencyIsoCode",isoCode); @@ -951,11 +951,11 @@ return result; } - public static Map<String, Object>getShoppingCartItemIndex(DispatchContext dctx, Map<String, Object> context){ + public static Map<String, Object>getShoppingCartItemIndex(DispatchContext dctx, Map<String, Object> context) { Map<String, Object> result = ServiceUtil.returnSuccess(); ShoppingCart shoppingCart = (ShoppingCart) context.get("shoppingCart"); String productId = (String) context.get("productId"); - if (shoppingCart != null && UtilValidate.isNotEmpty(shoppingCart.items())){ + if (shoppingCart != null && UtilValidate.isNotEmpty(shoppingCart.items())) { List allItems = shoppingCart.items(); List items = shoppingCart.findAllCartItems(productId); if (items.size() > 0) { Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java Fri Mar 6 17:31:13 2009 @@ -68,7 +68,7 @@ int shipGroups = cart.getShipGroupSize(); for (int i = 0; i < shipGroups; i++) { String shipmentMethodTypeId = cart.getShipmentMethodTypeId(i); - if(UtilValidate.isEmpty(shipmentMethodTypeId)){ + if(UtilValidate.isEmpty(shipmentMethodTypeId)) { continue; } Map result = getShipGroupEstimate(dispatcher, delegator, cart, i); @@ -152,7 +152,7 @@ String standardMessage = "A problem occurred calculating shipping. Fees will be calculated offline."; List errorMessageList = new ArrayList(); - if (shipmentMethodTypeId.equals("NO_SHIPPING")){ + if (shipmentMethodTypeId.equals("NO_SHIPPING")) { return ServiceUtil.returnSuccess(); } @@ -279,10 +279,10 @@ // invoke the external shipping estimate service String serviceName = (String)storeShipMeth.get("serviceName"); BigDecimal externalShipAmt = null; - if(serviceName != null){ + if(serviceName != null) { String doEstimates = UtilProperties.getPropertyValue("shipment.properties", "shipment.doratecheck", "true"); //If all estimates are not turned off, check for the individual one - if("true".equals(doEstimates)){ + if("true".equals(doEstimates)) { String dothisEstimate = UtilProperties.getPropertyValue("shipment.properties", "shipment.doratecheck." + serviceName, "true"); if("false".equals(dothisEstimate)) serviceName = null; Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java Fri Mar 6 17:31:13 2009 @@ -457,7 +457,7 @@ listCart.setOrderPartyId(shoppingList.getString("partyId")); listCart.setAutoOrderShoppingListId(shoppingList.getString("shoppingListId")); } else { - if (!listCart.getPartyId().equals(shoppingList.getString("partyId"))){ + if (!listCart.getPartyId().equals(shoppingList.getString("partyId"))) { Debug.logError("CANNOT add shoppingList: " + shoppingList.getString("shoppingListId") + " of partyId: " + shoppingList.getString("partyId") + " to a shoppingcart with a different orderPartyId: " Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java (original) +++ ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java Fri Mar 6 17:31:13 2009 @@ -892,7 +892,7 @@ deletePcmCtx.put("userLogin", context.get("userLogin")); try { Map<String, Object> deletePcmResult = ctx.getDispatcher().runSync("deletePartyContactMechPurpose", deletePcmCtx); - if(ServiceUtil.isError(deletePcmResult)){ + if(ServiceUtil.isError(deletePcmResult)) { return deletePcmResult; } } catch (GenericServiceException e) { @@ -1054,7 +1054,7 @@ SecureRandom secureRandom = new SecureRandom(); synchronized(ContactMechServices.class) { - while(true){ + while(true) { Long random = secureRandom.nextLong(); verifyHash = HashCrypt.getDigestHash(Long.toString(random), "MD5"); List<GenericValue> emailAddVerifications = null; Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java (original) +++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java Fri Mar 6 17:31:13 2009 @@ -650,7 +650,7 @@ Locale locale = (Locale) context.get("locale"); String errMsg = null; - if (email.length() == 0){ + if (email.length() == 0) { errMsg = UtilProperties.getMessage(resource,"partyservices.required_parameter_email_cannot_be_empty", locale); return ServiceUtil.returnError(errMsg); } @@ -686,7 +686,7 @@ Locale locale = (Locale) context.get("locale"); String errMsg = null; - if (email.length() == 0){ + if (email.length() == 0) { errMsg = UtilProperties.getMessage(resource,"partyservices.required_parameter_email_cannot_be_empty", locale); return ServiceUtil.returnError(errMsg); } @@ -775,7 +775,7 @@ if (lastName == null) { lastName = ""; } - if (firstName.length() == 0 && lastName.length() == 0){ + if (firstName.length() == 0 && lastName.length() == 0) { String errMsg = UtilProperties.getMessage(resource,"partyservices.both_names_cannot_be_empty", locale); return ServiceUtil.returnError(errMsg); } Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java Fri Mar 6 17:31:13 2009 @@ -188,7 +188,7 @@ for (ConfigItem ci: questions) { if (ci.isMandatory()) { ConfigOption co = ci.getDefault(); - if(co != null){ + if(co != null) { co.setSelected(true); }else if (ci.getOptions().size() > 0) { co = ci.getOptions().get(0); @@ -292,7 +292,7 @@ List<ConfigOption> defaultOptions = FastList.newInstance(); for (ConfigItem ci: questions) { ConfigOption co = ci.getDefault(); - if (co != null){ + if (co != null) { defaultOptions.add(co); } } @@ -326,7 +326,7 @@ defaultPrice = totalPrice; } - public BigDecimal getDefaultPrice(){ + public BigDecimal getDefaultPrice() { return defaultPrice; } @@ -479,12 +479,12 @@ return null; } - public ConfigOption getDefault(){ + public ConfigOption getDefault() { String defaultConfigOptionId = configItemAssoc.getString("defaultConfigOptionId"); - if(UtilValidate.isNotEmpty(defaultConfigOptionId)){ + if(UtilValidate.isNotEmpty(defaultConfigOptionId)) { for(ConfigOption oneOption : getOptions()) { String currentConfigOptionId = oneOption.getId(); - if (defaultConfigOptionId.compareToIgnoreCase(currentConfigOptionId) == 0 ){ + if (defaultConfigOptionId.compareToIgnoreCase(currentConfigOptionId) == 0 ) { return oneOption; } } @@ -644,7 +644,7 @@ return (configOption.getString("description") != null? configOption.getString("description"): "no description"); } - public String getId(){ + public String getId() { return configOption.getString("configOptionId"); } @@ -666,7 +666,7 @@ public BigDecimal getOffsetListPrice() { ConfigOption defaultConfigOption = parentConfigItem.getDefault(); - if (parentConfigItem.isSingleChoice() && UtilValidate.isNotEmpty(defaultConfigOption)){ + if (parentConfigItem.isSingleChoice() && UtilValidate.isNotEmpty(defaultConfigOption)) { return optionListPrice.subtract(defaultConfigOption.getListPrice()); } else { // can select multiple or no default; show full price return optionListPrice; @@ -675,7 +675,7 @@ public BigDecimal getOffsetPrice() { ConfigOption defaultConfigOption = parentConfigItem.getDefault(); - if (parentConfigItem.isSingleChoice() && UtilValidate.isNotEmpty(defaultConfigOption)){ + if (parentConfigItem.isSingleChoice() && UtilValidate.isNotEmpty(defaultConfigOption)) { return optionPrice.subtract(defaultConfigOption.getPrice()); } else { // can select multiple or no default; show full price return optionPrice; Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java Fri Mar 6 17:31:13 2009 @@ -78,7 +78,7 @@ fieldToSearch = "productFeatureGroupId"; valueToSearch = (String) context.get("productFeatureGroupId"); // use same orderBy as with a productFeatureCategoryId search - } else if (valueToSearch == null && context.get("productId") != null){ + } else if (valueToSearch == null && context.get("productId") != null) { entityToSearch = "ProductFeatureAndAppl"; fieldToSearch = "productId"; valueToSearch = (String) context.get("productId"); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java Fri Mar 6 17:31:13 2009 @@ -860,11 +860,11 @@ } //change this for product price for (GenericValue onePrice: productPrices) { - if(onePrice.getString("productPriceTypeId").equals("DEFAULT_PRICE")){ //defaultPrice + if(onePrice.getString("productPriceTypeId").equals("DEFAULT_PRICE")) { //defaultPrice result.put("defultPrice", onePrice.getBigDecimal("price")); - }else if(onePrice.getString("productPriceTypeId").equals("WHOLESALE_PRICE")){// + }else if(onePrice.getString("productPriceTypeId").equals("WHOLESALE_PRICE")) {// result.put("wholeSalePrice", onePrice.getBigDecimal("price")); - }else if(onePrice.getString("productPriceTypeId").equals("LIST_PRICE")){//listPrice + }else if(onePrice.getString("productPriceTypeId").equals("LIST_PRICE")) {//listPrice result.put("listPrice", onePrice.getBigDecimal("price")); }else{ result.put("defultPrice", onePrice.getBigDecimal("price")); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java Fri Mar 6 17:31:13 2009 @@ -964,11 +964,11 @@ Map<String, Object> resultResize = FastMap.newInstance(); try{ resultResize.putAll(imageTransform.scaleImageInAllSize(context, filenameToUse, "additional", viewNumber)); - }catch(IOException e){ + }catch(IOException e) { String errMsg = "Scale additional image in all different sizes is impossible : " + e.toString(); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); - }catch(JDOMException e){ + }catch(JDOMException e) { String errMsg = "Errors occur in parsing ImageProperties.xml : " + e.toString(); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java Fri Mar 6 17:31:13 2009 @@ -876,7 +876,7 @@ product = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", idToFind)); } - if (UtilValidate.isNotEmpty(product)){ + if (UtilValidate.isNotEmpty(product)) { if (UtilValidate.isNotEmpty(productsFound)) productsFound.add(product); else productsFound = UtilMisc.toList(product); } @@ -911,8 +911,8 @@ public static List<GenericValue> findProducts(GenericDelegator delegator, String idToFind, String goodIdentificationTypeId) throws GenericEntityException { List<GenericValue> productsByIds = findProductsById(delegator, idToFind, goodIdentificationTypeId); List<GenericValue> products = null; - if (UtilValidate.isNotEmpty(productsByIds)){ - for (GenericValue product : productsByIds){ + if (UtilValidate.isNotEmpty(productsByIds)) { + for (GenericValue product : productsByIds) { GenericValue productToAdd = product; //retreive product GV if the actual genericValue came from viewEntity if (! "Product".equals(product.getEntityName())) { @@ -995,10 +995,10 @@ "productFeatureIactnTypeId","FEATURE_IACTN_INCOMP")); for (GenericValue incompatibilityVariant: incompatibilityVariants) { String featur = incompatibilityVariant.getString("productFeatureId"); - if(paramValue.equals(featur)){ + if(paramValue.equals(featur)) { String featurTo = incompatibilityVariant.getString("productFeatureIdTo"); for (String paramValueTo: selectedFeatures) { - if(featurTo.equals(paramValueTo)){ + if(featurTo.equals(paramValueTo)) { Debug.logWarning("Incompatible features", module); return null; } @@ -1011,11 +1011,11 @@ "productFeatureIactnTypeId","FEATURE_IACTN_DEPEND")); for (GenericValue dpVariant: dependenciesVariants) { String featur = dpVariant.getString("productFeatureId"); - if(paramValue.equals(featur)){ + if(paramValue.equals(featur)) { String featurTo = dpVariant.getString("productFeatureIdTo"); boolean found = false; for (String paramValueTo: selectedFeatures) { - if(featurTo.equals(paramValueTo)){ + if(featurTo.equals(paramValueTo)) { found = true; break; } Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java Fri Mar 6 17:31:13 2009 @@ -115,7 +115,7 @@ } catch (GenericEntityException ex) { Debug.logError(ex, ex.getMessage(), module); return ServiceUtil.returnError(ex.getMessage()); - }catch(Exception ex){ + }catch(Exception ex) { Debug.logError(ex, ex.getMessage(), module); return ServiceUtil.returnError(ex.getMessage()); } Modified: ofbiz/trunk/framework/appserver/src/org/ofbiz/appservers/GenerateGeronimoDeployment.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/appserver/src/org/ofbiz/appservers/GenerateGeronimoDeployment.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/appserver/src/org/ofbiz/appservers/GenerateGeronimoDeployment.java (original) +++ ofbiz/trunk/framework/appserver/src/org/ofbiz/appservers/GenerateGeronimoDeployment.java Fri Mar 6 17:31:13 2009 @@ -143,7 +143,7 @@ return jar_version; } - private void parseTemplate(File templateFile, ComponentConfig.WebappInfo webApp){ + private void parseTemplate(File templateFile, ComponentConfig.WebappInfo webApp) { Debug.log("Parsing template : " + templateFile.getAbsolutePath() + " for web app " + webApp.getName(), module); Map<String, Object> dataMap= new HashMap<String, Object>(); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/test/BaseUnitTests.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/test/BaseUnitTests.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/test/BaseUnitTests.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/test/BaseUnitTests.java Fri Mar 6 17:31:13 2009 @@ -40,19 +40,19 @@ assertTrue(Debug.infoOn()); } - public void testFormatPrintableCreditCard_1(){ + public void testFormatPrintableCreditCard_1() { assertEquals("test 4111111111111111 to ************111", "************1111", UtilFormatOut.formatPrintableCreditCard("4111111111111111")); } - public void testFormatPrintableCreditCard_2(){ + public void testFormatPrintableCreditCard_2() { assertEquals("test 4111 to 4111", "4111", UtilFormatOut.formatPrintableCreditCard("4111")); } - public void testFormatPrintableCreditCard_3(){ + public void testFormatPrintableCreditCard_3() { assertEquals("test null to null", null, UtilFormatOut.formatPrintableCreditCard(null)); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilFormatOut.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilFormatOut.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilFormatOut.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilFormatOut.java Fri Mar 6 17:31:13 2009 @@ -523,7 +523,7 @@ if (original.length() <= 4) return original; StringBuffer buffer = new StringBuffer(); - for(int i=0; i < original.length()-4 ; i++){ + for(int i=0; i < original.length()-4 ; i++) { buffer.append('*'); } buffer.append(original.substring(original.length()-4)); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java Fri Mar 6 17:31:13 2009 @@ -1036,7 +1036,7 @@ } if (!paramNames.contains(name)) { cleanQuery.append(token); - if(queryTokens.hasMoreTokens()){ + if(queryTokens.hasMoreTokens()) { cleanQuery.append("&"); } } @@ -1208,12 +1208,12 @@ * @param request * @return whether the request is from a web searchbot */ - public static boolean checkURLforSpiders(HttpServletRequest request){ + public static boolean checkURLforSpiders(HttpServletRequest request) { boolean result = false; String spiderRequest = (String) request.getAttribute("_REQUEST_FROM_SPIDER_"); - if (UtilValidate.isNotEmpty(spiderRequest)){ - if ("Y".equals(spiderRequest)){ + if (UtilValidate.isNotEmpty(spiderRequest)) { + if ("Y".equals(spiderRequest)) { return true; }else{ return false; @@ -1225,7 +1225,7 @@ for (String spiderNameElement: spiderList) { Pattern p = Pattern.compile("^.*" + spiderNameElement + ".*$", Pattern.CASE_INSENSITIVE); Matcher m = p.matcher(initialUserAgent); - if (m.find()){ + if (m.find()) { request.setAttribute("_REQUEST_FROM_SPIDER_", "Y"); result = true; break; Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/ResourceBundleMapWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/ResourceBundleMapWrapper.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/ResourceBundleMapWrapper.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/ResourceBundleMapWrapper.java Fri Mar 6 17:31:13 2009 @@ -118,7 +118,7 @@ Object value = this.rbmwStack.get(arg0); if (value == null) { value = arg0; - } else if (context != null){ + } else if (context != null) { try { String str = (String) value; return FlexibleStringExpander.expandString(str, context); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java Fri Mar 6 17:31:13 2009 @@ -246,7 +246,7 @@ // Evaluation sequence is important - do not change it if (expression.contains("?currency(")) { strElems.add(new CurrElem(expression)); - } else if (expression.contains(openBracket)){ + } else if (expression.contains(openBracket)) { strElems.add(new NestedVarElem(expression)); } else { strElems.add(new VarElem(expression)); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelUtil.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelUtil.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelUtil.java Fri Mar 6 17:31:13 2009 @@ -246,7 +246,7 @@ context.setPropertyResolved(true); List list = (List) base; list.add(val); - } else if (str.startsWith("insert@")){ + } else if (str.startsWith("insert@")) { if (Debug.verboseOn()) { Debug.logVerbose("ExtendedListResolver.setValue inserting List element: base = " + base + ", property = " + property + ", value = " + val, module); } Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/Captcha.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/Captcha.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/common/src/org/ofbiz/common/Captcha.java (original) +++ ofbiz/trunk/framework/common/src/org/ofbiz/common/Captcha.java Fri Mar 6 17:31:13 2009 @@ -167,7 +167,7 @@ } public static void deleteFile() { - if(CAPTCHA_FILE_PATH != null){ + if(CAPTCHA_FILE_PATH != null) { File file = new File(CAPTCHA_FILE_PATH); file.delete(); } Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java (original) +++ ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java Fri Mar 6 17:31:13 2009 @@ -379,7 +379,7 @@ //No valid value is found so don't bother to save any password history passwordChangeHistoryLimit = 0; } - if (passwordChangeHistoryLimit == 0 || passwordChangeHistoryLimit < 0){ + if (passwordChangeHistoryLimit == 0 || passwordChangeHistoryLimit < 0) { // Not saving password history, so return from here. return; } @@ -389,14 +389,14 @@ EntityListIterator eli = delegator.find("UserLoginPasswordHistory", EntityCondition.makeConditionMap("userLoginId", userLoginId), null, null, UtilMisc.toList("-fromDate"), efo); Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); GenericValue pwdHist; - if ((pwdHist = eli.next()) != null){ + if ((pwdHist = eli.next()) != null) { // updating password so set end date on previous password in history pwdHist.set("thruDate", nowTimestamp); pwdHist.store(); // check if we have hit the limit on number of password changes to be saved. If we did then delete the oldest password from history. eli.last(); int rowIndex = eli.currentIndex(); - if (rowIndex==passwordChangeHistoryLimit){ + if (rowIndex==passwordChangeHistoryLimit) { eli.afterLast(); pwdHist = eli.previous(); pwdHist.remove(); @@ -840,7 +840,7 @@ } Debug.logInfo(" password.change.history.limit is set to " + passwordChangeHistoryLimit, module); Debug.logInfo(" userLogin is set to " + userLogin, module); - if(passwordChangeHistoryLimit > 0 && userLogin != null ){ + if(passwordChangeHistoryLimit > 0 && userLogin != null ) { Debug.logInfo(" checkNewPassword Checking if user is tyring to use old password " + passwordChangeHistoryLimit, module); GenericDelegator delegator = userLogin.getDelegator(); String newPasswordHash = newPassword; @@ -850,7 +850,7 @@ try { List<GenericValue> pwdHistList = delegator.findByAnd("UserLoginPasswordHistory", UtilMisc.toMap("userLoginId",userLogin.getString("userLoginId"),"currentPassword",newPasswordHash)); Debug.logInfo(" checkNewPassword pwdHistListpwdHistList " + pwdHistList.size(), module); - if(pwdHistList.size() >0){ + if(pwdHistList.size() >0) { Map<String, Integer> messageMap = UtilMisc.toMap("passwordChangeHistoryLimit", passwordChangeHistoryLimit); errMsg = UtilProperties.getMessage(resource,"loginservices.password_must_be_different_from_last_passwords", messageMap, locale); errorMessageList.add(errMsg); Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java Fri Mar 6 17:31:13 2009 @@ -584,7 +584,7 @@ if (Debug.infoOn()) Debug.logInfo("Created " + numIndicesCreated + " indices", module); } - if (datasourceInfo.checkIndicesOnStart){ + if (datasourceInfo.checkIndicesOnStart) { int numIndicesCreated = 0; // TODO: check each key-map to make sure it exists in the index, if any differences warn and then remove the index and recreate it Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java Fri Mar 6 17:31:13 2009 @@ -390,12 +390,12 @@ */ public void testCreateManyAndStoreOneAtATime() throws Exception { try { - for (int i = 0; i < TEST_COUNT; i++){ + for (int i = 0; i < TEST_COUNT; i++) { delegator.create(delegator.makeValue("Testing", "testingId", getTestId("T2-", i))); } List<GenericValue> newlyCreatedValues = delegator.findList("Testing", null, null, UtilMisc.toList("testingId"), null, false); TestCase.assertEquals("Test to create " + TEST_COUNT + " and store one at a time: ", TEST_COUNT, newlyCreatedValues.size()); - } catch (GenericEntityException e){ + } catch (GenericEntityException e) { assertTrue("GenericEntityException:" + e.toString(), false); return; } Modified: ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java (original) +++ ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java Fri Mar 6 17:31:13 2009 @@ -365,7 +365,7 @@ if (purposeList.size() > 0) { passed = hasMatch(entityName, targetOperationEntityList, roleList, hasPurposeOp, purposeList, hasStatusOp, statusId); } - if (passed){ + if (passed) { break; } purposes.put(entityId, purposeList); @@ -559,7 +559,7 @@ checkAncestors = false; passed = hasMatch(entity, permissionConditionGetter, relatedRoleGetter, auxiliaryValueGetter, partyId, checkAncestors); - if (passed){ + if (passed) { break; } } @@ -578,7 +578,7 @@ checkAncestors = false; passed = hasMatch(entity, permissionConditionGetter, relatedRoleGetter, auxiliaryValueGetter, partyId, checkAncestors); - if (passed){ + if (passed) { break; } } @@ -594,7 +594,7 @@ checkAncestors = true; passed = hasMatch(entity, permissionConditionGetter, relatedRoleGetter, auxiliaryValueGetter, partyId, checkAncestors); - if (passed){ + if (passed) { break; } } Modified: ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java (original) +++ ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java Fri Mar 6 17:31:13 2009 @@ -144,7 +144,7 @@ suffix = "_" + suffix; } String language = UtilProperties.getPropertyValue(startupProperties, "Language"); - if(language.compareTo("XuiLabels" + suffix ) != 0){ + if(language.compareTo("XuiLabels" + suffix ) != 0) { UtilProperties.setPropertyValue(startupProperties, "Language", "XuiLabels" + suffix); } frame.setVisible(true); Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/CreateValue.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/CreateValue.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/CreateValue.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/CreateValue.java Fri Mar 6 17:31:13 2009 @@ -72,7 +72,7 @@ return false; } try { - if (createOrStore = true){ + if (createOrStore = true) { methodContext.getDelegator().createOrStore(value, doCacheClear); } else { methodContext.getDelegator().create(value, doCacheClear); Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java (original) +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java Fri Mar 6 17:31:13 2009 @@ -90,7 +90,7 @@ } // if fieldVal is null, or has zero length, use defaultVal - if ((fieldVal == null) || (fieldVal.length() == 0)){ + if ((fieldVal == null) || (fieldVal.length() == 0)) { fieldVal = defaultVal; } Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericDispatcher.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericDispatcher.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericDispatcher.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericDispatcher.java Fri Mar 6 17:31:13 2009 @@ -128,7 +128,7 @@ if (Debug.verboseOn()) Debug.logVerbose("[LocalDispatcher] : Created Dispatcher for: " + name, module); } - public void disableEcas(){ + public void disableEcas() { ecasDisabled = true; } Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/SOAPClientEngine.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/SOAPClientEngine.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/SOAPClientEngine.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/SOAPClientEngine.java Fri Mar 6 17:31:13 2009 @@ -105,7 +105,7 @@ call.setTargetEndpointAddress(endPoint); - if (UtilValidate.isNotEmpty(modelService.nameSpace)){ + if (UtilValidate.isNotEmpty(modelService.nameSpace)) { call.setOperationName(new QName(modelService.nameSpace, modelService.invoke)); } else { call.setOperationName(modelService.invoke); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsServiceEngine.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsServiceEngine.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsServiceEngine.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsServiceEngine.java Fri Mar 6 17:31:13 2009 @@ -201,7 +201,7 @@ try { jndi = JNDIContextFactory.getInitialContext(serverName); factory = (QueueConnectionFactory) jndi.lookup(jndiName); - } catch (GeneralException ge){ + } catch (GeneralException ge) { throw new GenericServiceException("Problems getting JNDI InitialContext.", ge.getNested()); } catch (NamingException ne) { JNDIContextFactory.clearInitialContext(serverName); @@ -259,14 +259,14 @@ try { jndi = JNDIContextFactory.getInitialContext(serverName); factory = (XAQueueConnectionFactory) jndi.lookup(jndiName); - } catch (GeneralException ge){ + } catch (GeneralException ge) { throw new GenericServiceException("Problems getting JNDI InitialContext.", ge.getNested()); } catch (NamingException ne) { JNDIContextFactory.clearInitialContext(serverName); try { jndi = JNDIContextFactory.getInitialContext(serverName); factory = (XAQueueConnectionFactory) jndi.lookup(jndiName); - } catch (GeneralException ge2){ + } catch (GeneralException ge2) { throw new GenericServiceException("Problems getting JNDI InitialContext.", ge2.getNested()); } catch (NamingException ne2) { throw new GenericServiceException("JNDI lookup problems.", ne2); Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Fri Mar 6 17:31:13 2009 @@ -919,7 +919,7 @@ boolean isSpider = false; // if the current request comes from a spider, we will not add the jsessionid to the link - if (UtilHttp.checkURLforSpiders(request)){ + if (UtilHttp.checkURLforSpiders(request)) { isSpider = true; } @@ -936,7 +936,7 @@ if (response != null && !forceManualJsessionid && !isSpider) { encodedUrl = response.encodeURL(newURL.toString()); } else { - if (!isSpider){ + if (!isSpider) { String sessionId = ";jsessionid=" + request.getSession().getId(); // this should be inserted just after the "?" for the parameters, if there is one, or at the end of the string int questionIndex = newURL.indexOf("?"); Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java Fri Mar 6 17:31:13 2009 @@ -406,7 +406,7 @@ Map<String, Object> syncServiceResult = null; // schedule service try { - if(null!=request.getParameter("_RUN_SYNC_") && request.getParameter("_RUN_SYNC_").equals("Y")){ + if(null!=request.getParameter("_RUN_SYNC_") && request.getParameter("_RUN_SYNC_").equals("Y")) { syncServiceResult = dispatcher.runSync(serviceName, serviceContext); }else{ dispatcher.schedule(jobName, poolName, serviceName, serviceContext, startTime, frequency, interval, count, endTime, maxRetry); @@ -419,7 +419,7 @@ String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.service_scheduled", locale); request.setAttribute("_EVENT_MESSAGE_", errMsg); - if(null!=syncServiceResult){ + if(null!=syncServiceResult) { request.getSession().setAttribute("_RUN_SYNC_RESULT_", syncServiceResult); return "sync_success"; } @@ -430,7 +430,7 @@ HttpSession session = request.getSession(); Locale locale = UtilHttp.getLocale(request); Map<String, Object> syncServiceResult = checkMap(session.getAttribute("_RUN_SYNC_RESULT_"), String.class, Object.class); - if(null==syncServiceResult){ + if(null==syncServiceResult) { String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.no_fields_in_session", locale); request.setAttribute("_ERROR_MESSAGE_", "<li>" + errMsg); return "error"; @@ -443,13 +443,13 @@ Map<String, Object> savedFields = FastMap.newInstance(); for (String key: serviceFieldsToSave.keySet()) { - if(null!=serviceFieldsToSave.get(key) && request.getParameter(key).equalsIgnoreCase("on") && !key.equals("_CLEAR_PREVIOUS_PARAMS_")){ + if(null!=serviceFieldsToSave.get(key) && request.getParameter(key).equalsIgnoreCase("on") && !key.equals("_CLEAR_PREVIOUS_PARAMS_")) { String[] servicePath = key.split("\\|\\|"); String partialKey = servicePath[servicePath.length-1]; savedFields.put(partialKey, getObjectFromServicePath(key ,syncServiceResult)); } } - if(null!=session.getAttribute("_SAVED_SYNC_RESULT_")){ + if(null!=session.getAttribute("_SAVED_SYNC_RESULT_")) { Map<String, Object> savedSyncResult = checkMap(session.getAttribute("_SAVED_SYNC_RESULT_"), String.class, Object.class); savedSyncResult.putAll(savedFields); savedFields = savedSyncResult; @@ -459,28 +459,28 @@ } //Tries to return a map, if Object is one of Map, GenericEntity, List - public static Object getObjectFromServicePath(String servicePath, Map<String, ? extends Object> serviceResult){ + public static Object getObjectFromServicePath(String servicePath, Map<String, ? extends Object> serviceResult) { String[] sp = servicePath.split("\\|\\|"); Object servicePathObject = null; Map<String, Object> servicePathMap = null; - for(int i=0;i<sp.length;i++){ + for(int i=0;i<sp.length;i++) { String servicePathEntry = sp[i]; - if(null==servicePathMap){ + if(null==servicePathMap) { servicePathObject = serviceResult.get(servicePathEntry); }else{ servicePathObject = servicePathMap.get(servicePathEntry); } servicePathMap = null; - if(servicePathObject instanceof Map){ + if(servicePathObject instanceof Map) { servicePathMap = checkMap(servicePathObject); - }else if(servicePathObject instanceof GenericEntity){ + }else if(servicePathObject instanceof GenericEntity) { GenericEntity servicePathEntity = (GenericEntity)servicePathObject; servicePathMap = FastMap.newInstance(); for (Map.Entry<String, Object> entry: servicePathEntity.entrySet()) { servicePathMap.put(entry.getKey(), entry.getValue()); } - }else if(servicePathObject instanceof Collection){ + }else if(servicePathObject instanceof Collection) { Collection<?> servicePathColl = checkCollection(servicePathObject); int count=0; servicePathMap = FastMap.newInstance(); @@ -490,7 +490,7 @@ } } } - if(null==servicePathMap){ + if(null==servicePathMap) { return servicePathObject; }else{ return servicePathMap; Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java Fri Mar 6 17:31:13 2009 @@ -194,7 +194,7 @@ if (encoding != null) { try { multiPartMap.put(fieldName, item.getString(encoding)); - } catch (java.io.UnsupportedEncodingException uee){ + } catch (java.io.UnsupportedEncodingException uee) { Debug.logError(uee, "Unsupported Encoding, using deafault", module); multiPartMap.put(fieldName, item.getString()); } Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceVariantsEventHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceVariantsEventHandler.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceVariantsEventHandler.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceVariantsEventHandler.java Fri Mar 6 17:31:13 2009 @@ -156,33 +156,33 @@ variantList.addAll(assocProductsList); // get Sub-Variant - for(GenericValue assocProduct: assocProductsList){ + for(GenericValue assocProduct: assocProductsList) { try{ GenericValue variant = (GenericValue) dispatcher.runSync("getProduct", UtilMisc.toMap("productId", assocProduct.get("productIdTo"))).get("product"); - if(variant.get("isVirtual").toString().equals("Y")){ + if(variant.get("isVirtual").toString().equals("Y")) { // save Sub-Variant Products try{ Map<String, Object> subVariantMap = dispatcher.runSync("getAllProductVariants", UtilMisc.toMap("productId", assocProduct.get("productIdTo"))); - if(subVariantMap.get("responseMessage").equals("success") && subVariantMap.get("assocProducts") != null){ + if(subVariantMap.get("responseMessage").equals("success") && subVariantMap.get("assocProducts") != null) { variantList.addAll((FastList<GenericValue>) subVariantMap.get("assocProducts")); } - }catch(GenericServiceException e){ + }catch(GenericServiceException e) { Debug.logError(e, "Unable to getAllProductVariants for productId (" + assocProduct.get("productIdTo") +"): ", module); } } - }catch(GenericServiceException e){ + }catch(GenericServiceException e) { Debug.logError(e, "Unable to getProduct for productId (" + assocProduct.get("productIdTo") +"): ", module); } } } - }catch(GenericServiceException e){ + }catch(GenericServiceException e) { Debug.logError(e, "Unable to getAllProductVariants for productId (" + productId +"): ", module); } } // Variants // save (Virtual) Product variantList.addFirst(product); - }catch(GenericServiceException e){ + }catch(GenericServiceException e) { Debug.logError(e, "Unable to getProduct for productId (" + productId +"): ", module); } } @@ -220,7 +220,7 @@ // now loop throw the Variant Products and prepare/invoke the service for each //for (int i = 0; i < rowCount; i++) { - for(GenericValue variant : variantList){ + for(GenericValue variant : variantList) { String currentProductId = new String(); // build the context @@ -239,8 +239,8 @@ Object value = null; // set Product Id - if("productId".equals(paramName)){ - if(variant.getEntityName().equals("ProductAssoc")){ + if("productId".equals(paramName)) { + if(variant.getEntityName().equals("ProductAssoc")) { value = variant.get("productIdTo"); currentProductId = (String) value; }else{ Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java Fri Mar 6 17:31:13 2009 @@ -139,7 +139,7 @@ if (initialReferrer != null) visit.set("initialReferrer", initialReferrer.length() > 250 ? initialReferrer.substring(0, 250) : initialReferrer); if (initialUserAgent != null) visit.set("initialUserAgent", initialUserAgent.length() > 250 ? initialUserAgent.substring(0, 250) : initialUserAgent); visit.set("webappName", webappName); - if (UtilProperties.propertyValueEquals("serverstats", "stats.proxy.enabled", "true")){ + if (UtilProperties.propertyValueEquals("serverstats", "stats.proxy.enabled", "true")) { visit.set("clientIpAddress", session.getAttribute("_CLIENT_FORWARDED_FOR_")); } else { visit.set("clientIpAddress", session.getAttribute("_CLIENT_REMOTE_ADDR_")); Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java (original) +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java Fri Mar 6 17:31:13 2009 @@ -207,7 +207,7 @@ Long numberRead = (Long)outputMap.get("rowProcessed"); messages.add("Got " + numberRead.longValue() + " entities to write to the datasource."); } - } catch (Exception ex){ + } catch (Exception ex) { return ServiceUtil.returnError("ERROR parsing Entity Xml file: " + ex.getMessage()); } } else { @@ -456,7 +456,7 @@ long numberRead = (url != null ? reader.parse(url) : reader.parse(xmltext)); rowProcessed = numberRead; - } catch (Exception ex){ + } catch (Exception ex) { return ServiceUtil.returnError("Error parsing entity xml file: " + ex.toString()); } // send the notification Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java (original) +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java Fri Mar 6 17:31:13 2009 @@ -101,7 +101,7 @@ String fileNameURI = ftlFile.toURI().toString(); String inFile = FileUtil.readString("UTF-8", ftlFile); int pos = 0; - while (pos >= 0){ + while (pos >= 0) { pos = inFile.indexOf(uiLabelMap, pos); if (pos >= 0) { @@ -146,7 +146,7 @@ String fileNameURI = javaFile.toURI().toString(); String inFile = FileUtil.readString("UTF-8", javaFile); int pos = 0; - while (pos >= 0){ + while (pos >= 0) { pos = inFile.indexOf(message, pos); if (pos >= 0) { @@ -192,7 +192,7 @@ String fileNameURI = javaFile.toURI().toString(); String inFile = FileUtil.readString("UTF-8", javaFile); int pos = 0; - while (pos >= 0){ + while (pos >= 0) { pos = inFile.indexOf(message, pos); if (pos >= 0) { @@ -545,7 +545,7 @@ if (UtilValidate.isNotEmpty(attributeValue)) { int pos = 0; - while (pos >= 0){ + while (pos >= 0) { pos = attributeValue.indexOf(stringToSearch, pos); if (pos >= 0) { @@ -805,7 +805,7 @@ if (UtilValidate.isNotEmpty(entity) && UtilValidate.isNotEmpty(entity.getDefaultResourceName())) { int pos = 0; - while (pos >= 0){ + while (pos >= 0) { pos = description.indexOf(startExpression, pos); if (pos >= 0) { @@ -918,7 +918,7 @@ if (UtilValidate.isNotEmpty(entity) && UtilValidate.isNotEmpty(entity.getDefaultResourceName())) { int pos = 0; - while (pos >= 0){ + while (pos >= 0) { pos = description.indexOf(startExpression, pos); if (pos >= 0) { Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Fri Mar 6 17:31:13 2009 @@ -110,7 +110,7 @@ writer.append('>'); - if(request.getAttribute("image") != null){ + if(request.getAttribute("image") != null) { writer.append("<img src = \""+request.getAttribute("image").toString()+"\"/>"); } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Fri Mar 6 17:31:13 2009 @@ -462,7 +462,7 @@ } //alt-row-styles - for (Element altRowStyleElement : UtilXml.childElementList(formElement, "alt-row-style")){ + for (Element altRowStyleElement : UtilXml.childElementList(formElement, "alt-row-style")) { AltRowStyle altRowStyle = new AltRowStyle(altRowStyleElement); this.altRowStyles.add(altRowStyle); } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java Fri Mar 6 17:31:13 2009 @@ -347,7 +347,7 @@ String queryString = (String)result.get("queryString"); context.put("queryString", queryString); context.put("queryStringMap", result.get("queryStringMap")); - if (UtilValidate.isNotEmpty(queryString)){ + if (UtilValidate.isNotEmpty(queryString)) { try { String queryStringEncoded = queryString.replaceAll("&", "%26"); context.put("queryStringEncoded", queryStringEncoded); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java Fri Mar 6 17:31:13 2009 @@ -2262,7 +2262,7 @@ return this.target.expandString(context); } - public String getImage(){ + public String getImage() { return this.image; } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlTreeRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlTreeRenderer.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlTreeRenderer.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlTreeRenderer.java Fri Mar 6 17:31:13 2009 @@ -120,7 +120,7 @@ currentNodeTrail.add(lastContentId); } renderLink(writer, context, expandCollapseLink); - } else if (!hasChildren){ + } else if (!hasChildren) { context.put("processChildren", Boolean.FALSE); expandCollapseLink.setStyle("leafnode"); expandCollapseLink.setText(" "); @@ -136,7 +136,7 @@ } appendWhitespace(writer); writer.append("</li>"); - if (node.isRootNode()){ + if (node.isRootNode()) { appendWhitespace(writer); writer.append("</ul>"); appendWhitespace(writer); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java Fri Mar 6 17:31:13 2009 @@ -479,7 +479,7 @@ String queryString = (String)result.get("queryString"); context.put("queryString", queryString); context.put("queryStringMap", result.get("queryStringMap")); - if (UtilValidate.isNotEmpty(queryString)){ + if (UtilValidate.isNotEmpty(queryString)) { try { String queryStringEncoded = queryString.replaceAll("&", "%26"); context.put("queryStringEncoded", queryStringEncoded); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java Fri Mar 6 17:31:13 2009 @@ -269,7 +269,7 @@ String queryString = (String)result.get("queryString"); context.put("queryString", queryString); context.put("queryStringMap", result.get("queryStringMap")); - if (UtilValidate.isNotEmpty(queryString)){ + if (UtilValidate.isNotEmpty(queryString)) { try { String queryStringEncoded = queryString.replaceAll("&", "%26"); context.put("queryStringEncoded", queryStringEncoded); Modified: ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java (original) +++ ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java Fri Mar 6 17:31:13 2009 @@ -494,7 +494,7 @@ private static String parseText(String text) { Pattern htmlPattern = Pattern.compile("[<](.+?)[>]"); Pattern tabPattern = Pattern.compile("\\s"); - if (null != text && text.length() > 0){ + if (null != text && text.length() > 0) { Matcher matcher = htmlPattern.matcher(text); text = matcher.replaceAll(""); matcher = tabPattern.matcher(text); Modified: ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java (original) +++ ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java Fri Mar 6 17:31:13 2009 @@ -83,7 +83,7 @@ String sub = UtilXml.childElementValue(rootElement, "Scope", "sub").toLowerCase().trim(); if (sub.equals("sub")) { controls.setSearchScope(SearchControls.SUBTREE_SCOPE); - } else if (sub.equals("one")){ + } else if (sub.equals("one")) { controls.setSearchScope(SearchControls.ONELEVEL_SCOPE); } else { controls.setSearchScope(SearchControls.OBJECT_SCOPE); Modified: ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java (original) +++ ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java Fri Mar 6 17:31:13 2009 @@ -118,7 +118,7 @@ return "error"; } - public static String randomString(int lo, int hi){ + public static String randomString(int lo, int hi) { int n = rand(lo, hi); byte b[] = new byte[n]; for (int i = 0; i < n; i++) { @@ -127,7 +127,7 @@ return new String(b); } - private static int rand(int lo, int hi){ + private static int rand(int lo, int hi) { java.util.Random rn = new java.util.Random(); int n = hi - lo + 1; int i = rn.nextInt() % n; @@ -136,7 +136,7 @@ return lo + i; } - public static String randomString(){ + public static String randomString() { return randomString(5, 15); } Modified: ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java (original) +++ ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java Fri Mar 6 17:31:13 2009 @@ -68,7 +68,7 @@ String sub = UtilXml.childElementValue(rootElement, "Scope", "sub").toLowerCase().trim(); if (sub.equals("sub")) { controls.setSearchScope(SearchControls.SUBTREE_SCOPE); - } else if (sub.equals("one")){ + } else if (sub.equals("one")) { controls.setSearchScope(SearchControls.ONELEVEL_SCOPE); } else { controls.setSearchScope(SearchControls.OBJECT_SCOPE); Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java Fri Mar 6 17:31:13 2009 @@ -251,7 +251,7 @@ itemInfo.put("adjustments", UtilFormatOut.formatPrice(item.getOtherAdjustments())); } - if (isAggregatedItem(item.getProductId())){ + if (isAggregatedItem(item.getProductId())) { ProductConfigWrapper pcw = null; pcw = item.getConfigWrapper(); itemInfo.put("basePrice", UtilFormatOut.formatPrice(pcw.getDefaultPrice())); @@ -267,15 +267,15 @@ // to use foreach in receipt.java ShoppingCartItem item = cart.findCartItem(index); - if(this.isAggregatedItem(item.getProductId())){ + if(this.isAggregatedItem(item.getProductId())) { ProductConfigWrapper pcw = null; pcw = item.getConfigWrapper(); List selected = pcw.getSelectedOptions(); Iterator iter = selected.iterator(); - while(iter.hasNext()){ + while(iter.hasNext()) { ConfigOption configoption = (ConfigOption)iter.next(); Map itemInfo = FastMap.newInstance(); - if (configoption.isSelected() && !configoption.isDefault()){ + if (configoption.isSelected() && !configoption.isDefault()) { itemInfo.put("productId", ""); itemInfo.put("sku", ""); itemInfo.put("configDescription", configoption.getDescription()); @@ -400,7 +400,7 @@ } } - public boolean isAggregatedItem(String productId){ + public boolean isAggregatedItem(String productId) { trace("is Aggregated Item", productId); try { GenericDelegator delegator = cart.getDelegator(); @@ -409,17 +409,17 @@ if ("AGGREGATED".equals(product.getString("productTypeId"))) { return true; } - } catch (GenericEntityException e){ + } catch (GenericEntityException e) { trace("item lookup error", e); Debug.logError(e, module); - } catch (Exception e){ + } catch (Exception e) { trace("general exception", e); Debug.logError(e, module); } return false; } - public ProductConfigWrapper getProductConfigWrapper(String productId){ + public ProductConfigWrapper getProductConfigWrapper(String productId) { //Get a PCW for a new product trace("get Product Config Wrapper", productId); ProductConfigWrapper pcw = null; @@ -433,17 +433,17 @@ } catch (CartItemModifyException e) { trace("add item error", e); //throw e; - }catch (GenericEntityException e){ + }catch (GenericEntityException e) { trace("item lookup error", e); Debug.logError(e, module); - } catch (Exception e){ + } catch (Exception e) { trace("general exception", e); Debug.logError(e, module); } return pcw; } - public ProductConfigWrapper getProductConfigWrapper(String productId, String cartIndex ){ + public ProductConfigWrapper getProductConfigWrapper(String productId, String cartIndex ) { // Get a PCW for a pre-configured product trace("get Product Config Wrapper", productId + "/" + cartIndex ); ProductConfigWrapper pcw = null; @@ -452,7 +452,7 @@ ShoppingCartItem product = cart.findCartItem(index); GenericDelegator delegator = cart.getDelegator(); pcw = product.getConfigWrapper(); - } catch (Exception e){ + } catch (Exception e) { trace("general exception", e); Debug.logError(e, module); } @@ -479,10 +479,10 @@ } catch (CartItemModifyException e) { trace("add item error", e); throw e; - }catch (GenericEntityException e){ + }catch (GenericEntityException e) { trace("item lookup error", e); Debug.logError(e, module); - } catch (Exception e){ + } catch (Exception e) { trace("general exception", e); Debug.logError(e, module); } @@ -499,7 +499,7 @@ } catch (CartItemModifyException e) { trace("add item error", e); throw e; - } catch (Exception e){ + } catch (Exception e) { trace("general exception", e); Debug.logError(e, module); } @@ -521,7 +521,7 @@ } catch (ItemNotFoundException e) { trace("item not found", e); throw e; - } catch (Exception e){ + } catch (Exception e) { trace("general exception", e); Debug.logError(e, module); } @@ -805,7 +805,7 @@ } // store the "order" - if (UtilValidate.isEmpty(this.orderId)){ // if order does not exist + if (UtilValidate.isEmpty(this.orderId)) { // if order does not exist output.print(UtilProperties.getMessage(PosTransaction.resource,"PosSaving",defaultLocale)); Map orderRes = ch.createOrder(session.getUserLogin()); //Debug.log("Create Order Resp : " + orderRes, module); @@ -936,7 +936,7 @@ Journal.appendNode(line, "td", "price", UtilFormatOut.formatPrice(subTotal)); Journal.appendNode(line, "td", "index", Integer.toString(cart.getItemIndex(item))); - if (this.isAggregatedItem(item.getProductId())){ + if (this.isAggregatedItem(item.getProductId())) { // put alterations here ProductConfigWrapper pcw = null; // product = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", productId)); @@ -944,9 +944,9 @@ pcw = item.getConfigWrapper(); List selected = pcw.getSelectedOptions(); Iterator iter = selected.iterator(); - while(iter.hasNext()){ + while(iter.hasNext()) { ConfigOption configoption = (ConfigOption)iter.next(); - if (configoption.isSelected()){ + if (configoption.isSelected()) { XModel option = Journal.appendNode(model, "tr", ""+cart.getItemIndex(item), ""); Journal.appendNode(option, "td", "sku", ""); Journal.appendNode(option, "td", "desc", configoption.getDescription()); @@ -987,13 +987,13 @@ if (UtilValidate.isNotEmpty(adjustments)) { Iterator iter = adjustments.iterator(); - while(iter.hasNext()){ + while(iter.hasNext()) { GenericValue orderAdjustment = (GenericValue) iter.next(); BigDecimal amount = orderAdjustment.getBigDecimal("amount"); } iter = adjustments.iterator(); - while(iter.hasNext()){ + while(iter.hasNext()) { GenericValue orderAdjustment = (GenericValue) iter.next(); BigDecimal amount = orderAdjustment.getBigDecimal("amount"); BigDecimal sourcePercentage = orderAdjustment.getBigDecimal("sourcePercentage"); @@ -1223,7 +1223,7 @@ Debug.logError(ServiceUtil.getErrorMessage(svcRes) + " - " + svcRes, module); } else{ Integer orderListSize = (Integer) svcRes.get("orderListSize"); - if (orderListSize > 0){ + if (orderListSize > 0) { List orderList = (List) svcRes.get("orderList"); return orderList; } @@ -1246,7 +1246,7 @@ else { pos.showDialog("dialog/error/itemnotconfigurable"); } - } catch (Exception e){ + } catch (Exception e) { trace("general exception", e); Debug.logError(e, module); } @@ -1271,7 +1271,7 @@ public Hashtable createSalesMap(List shoppingLists) { Hashtable salesMap = new Hashtable(); Iterator i = shoppingLists.iterator(); - while (i.hasNext()){ + while (i.hasNext()) { GenericValue shoppingList = (GenericValue) i.next(); List items = null; try { @@ -1293,7 +1293,7 @@ for (GenericValue order : orders) { String orderName = order.getString("orderName"); String orderId = order.getString("orderId"); - if(orderName != null){ + if(orderName != null) { hash.put(orderId, orderName); } } @@ -1340,7 +1340,7 @@ Debug.logError(ServiceUtil.getErrorMessage(svcRes) + " - " + svcRes, module); } else{ ShoppingCart restoredCart = (ShoppingCart) svcRes.get("shoppingCart"); - if(append){ + if(append) { // TODO: add stuff to append items this.cart = restoredCart; this.orderId = orderId; Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java Fri Mar 6 17:31:13 2009 @@ -292,7 +292,7 @@ try { this.configPaddingLength[type] = Integer.parseInt(code[1]); StringBuffer spaces = new StringBuffer(); - for (int i=0; i < this.configPaddingLength[type]; i+=1){ + for (int i=0; i < this.configPaddingLength[type]; i+=1) { spaces.append(" "); } this.configPadding[type] = spaces.toString(); @@ -386,7 +386,7 @@ String[] lines = toPrint.split("\\n"); for (int x = 0; x < lines.length; x++) { String trimmed = lines[x].trim(); - if(trimmed.length()>1){ // if empty string don't println + if(trimmed.length()>1) { // if empty string don't println this.println(lines[x]); } } @@ -394,9 +394,9 @@ this.println(toPrint); } - if(trans.isAggregatedItem(((String)expandMap.get("productId")).trim())){ + if(trans.isAggregatedItem(((String)expandMap.get("productId")).trim())) { List<Map> maps = trans.getItemConfigInfo(i); - for (Map map: maps){ + for (Map map: maps) { expandMap = this.makeCodeExpandMap(trans, type); expandMap.putAll(map); // adjust the padding @@ -410,7 +410,7 @@ String[] lines = toPrint.split("\\n"); for (int x = 0; x < lines.length; x++) { String trimmed = lines[x].trim(); - if(trimmed.length()>1){ + if(trimmed.length()>1) { this.println(lines[x]); } } Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/MenuEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/MenuEvents.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/MenuEvents.java (original) +++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/MenuEvents.java Fri Mar 6 17:31:13 2009 @@ -198,14 +198,14 @@ ProductConfigWrapper pcw = null; try { aggregatedItem = trans.isAggregatedItem(productId); - if(aggregatedItem){ + if(aggregatedItem) { pcw = trans.getProductConfigWrapper(productId); pcw.setDefaultConfig(); ConfigureItem configureItem = new ConfigureItem(pcw, trans, pos); pcw = configureItem.openDlg(); configureItem = null; } - }catch(Exception e){ + }catch(Exception e) { Debug.logError(e, module); pos.showDialog("dialog/error/producterror"); } @@ -213,7 +213,7 @@ // add the item to the cart; report any errors to the user if (productId != null) { try { - if(!aggregatedItem){ + if(!aggregatedItem) { trans.addItem(productId, quantity); }else{ trans.addItem(productId, pcw); @@ -436,7 +436,7 @@ ProductConfigWrapper pcw = null; try { aggregatedItem = trans.isAggregatedItem(productId); - if(aggregatedItem){ + if(aggregatedItem) { pcw = trans.getProductConfigWrapper(productId, index); ConfigureItem configureItem = new ConfigureItem(pcw, trans, pos); pcw = configureItem.openDlg(); @@ -445,7 +445,7 @@ }else{ pos.showDialog("dialog/error/itemnotconfigurable"); } - }catch(Exception e){ + }catch(Exception e) { Debug.logError(e, module); pos.showDialog("dialog/error/producterror"); } |
Free forum by Nabble | Edit this page |