Author: jleroux
Date: Fri Mar 6 17:31:13 2009 New Revision: 750993 URL: http://svn.apache.org/viewvc?rev=750993&view=rev Log: In spirit of Adam's r749341 and following http://java.sun.com/docs/codeconv/html/CodeConventions.doc7.html#489 The idea is also that a lot of code is duplicated and then changed (copy/paste). Hence having a rightly formatted code help to keep it rightly formatted 1st (simple) step : ){ => ) { (I checked all occurrences but of course other pairs of eyeballs are welcome) Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AuthorizeResponse.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/PcChargeServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java ofbiz/trunk/framework/appserver/src/org/ofbiz/appservers/GenerateGeronimoDeployment.java ofbiz/trunk/framework/base/src/org/ofbiz/base/test/BaseUnitTests.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilFormatOut.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/ResourceBundleMapWrapper.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelUtil.java ofbiz/trunk/framework/common/src/org/ofbiz/common/Captcha.java ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/entityops/CreateValue.java ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericDispatcher.java ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/SOAPClientEngine.java ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsServiceEngine.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceVariantsEventHandler.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/stats/VisitHandler.java ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlTreeRenderer.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/MenuEvents.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/TestEvents.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ConfigureItem.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/NumericKeypad.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PaidInOut.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PosDialog.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/SaveSale.java ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/XFocusDialog.java ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java ofbiz/trunk/specialpurpose/shark/src/org/enhydra/shark/ThreadedToolAgentManager.java ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/auth/GenericAuthenticationMgr.java ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/auth/OfbizAuthenticationMgr.java ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/container/SharkContainer.java ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/repository/EntityRepositoryMgr.java ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/requester/LoggingRequester.java Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java Fri Mar 6 17:31:13 2009 @@ -312,7 +312,7 @@ String currency = (String) context.get("currency"); // get the authorization transaction - if (authTrans == null){ + if (authTrans == null) { authTrans = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference); } if (authTrans == null) { Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java Fri Mar 6 17:31:13 2009 @@ -355,7 +355,7 @@ // get the authorizations GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference"); GenericValue authTransaction = (GenericValue) context.get("authTrans"); - if (authTransaction == null){ + if (authTransaction == null) { authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference); } if (authTransaction == null) { Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java Fri Mar 6 17:31:13 2009 @@ -3230,7 +3230,7 @@ GenericValue authTransaction = (GenericValue) context.get("authTrans"); Debug.logInfo("Test Capture with 2 minute delay failure/re-auth process", module); - if (authTransaction == null){ + if (authTransaction == null) { authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference); } Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java Fri Mar 6 17:31:13 2009 @@ -188,7 +188,7 @@ List taxList = getTaxAdjustments(delegator, null, productStore, payToPartyId, billToPartyId, taxAuthoritySet, ZERO_BASE, ZERO_BASE, orderShippingAmount, ZERO_BASE); orderAdjustments.addAll(taxList); } - if (orderPromotionsAmount != null && orderPromotionsAmount.compareTo(BigDecimal.ZERO) != 0){ + if (orderPromotionsAmount != null && orderPromotionsAmount.compareTo(BigDecimal.ZERO) != 0) { List taxList = getTaxAdjustments(delegator, null, productStore, payToPartyId, billToPartyId, taxAuthoritySet, ZERO_BASE, ZERO_BASE, ZERO_BASE, orderPromotionsAmount); orderAdjustments.addAll(taxList); } Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AuthorizeResponse.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AuthorizeResponse.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AuthorizeResponse.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AuthorizeResponse.java Fri Mar 6 17:31:13 2009 @@ -157,14 +157,14 @@ int s1=0, s2=-1; List out = new ArrayList(40); out.add("empty"); - while(true){ + while(true) { s2 = r.indexOf(delim, s1); - if(s2 != -1){ + if(s2 != -1) { out.add(r.substring(s1, s2)); }else{ //the end part of the string (string not pattern terminated) String _ = r.substring(s1); - if(_ != null && !_.equals("")){ + if(_ != null && !_.equals("")) { out.add(_); } break; Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java Fri Mar 6 17:31:13 2009 @@ -96,7 +96,7 @@ //lets see if there is a auth transaction already in context GenericValue authTransaction = (GenericValue) context.get("authTrans"); - if (authTransaction == null){ + if (authTransaction == null) { authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference); } Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/PcChargeServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/PcChargeServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/PcChargeServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/PcChargeServices.java Fri Mar 6 17:31:13 2009 @@ -136,7 +136,7 @@ //lets see if there is a auth transaction already in context GenericValue authTransaction = (GenericValue) context.get("authTrans"); - if(authTransaction == null){ + if(authTransaction == null) { authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference); } @@ -192,7 +192,7 @@ //lets see if there is a auth transaction already in context GenericValue authTransaction = (GenericValue) context.get("authTrans"); - if(authTransaction == null){ + if(authTransaction == null) { authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference); } @@ -253,7 +253,7 @@ //lets see if there is a auth transaction already in context GenericValue authTransaction = (GenericValue) context.get("authTrans"); - if(authTransaction == null){ + if(authTransaction == null) { authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference); } Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java Fri Mar 6 17:31:13 2009 @@ -141,7 +141,7 @@ //lets see if there is a auth transaction already in context GenericValue authTransaction = (GenericValue) context.get("authTrans"); - if (authTransaction == null){ + if (authTransaction == null) { authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference); } @@ -205,7 +205,7 @@ //lets see if there is a auth transaction already in context GenericValue authTransaction = (GenericValue) context.get("authTrans"); - if (authTransaction == null){ + if (authTransaction == null) { authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference); } @@ -267,7 +267,7 @@ //lets see if there is a auth transaction already in context GenericValue authTransaction = (GenericValue) context.get("authTrans"); - if (authTransaction == null){ + if (authTransaction == null) { authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference); } Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java Fri Mar 6 17:31:13 2009 @@ -62,7 +62,7 @@ configString = "payment.properties"; } - if (authTrans == null){ + if (authTrans == null) { authTrans = PaymentGatewayServices.getAuthTransaction(paymentPref); } @@ -160,7 +160,7 @@ configString = "payment.properties"; } - if (authTrans == null){ + if (authTrans == null) { authTrans = PaymentGatewayServices.getAuthTransaction(paymentPref); } @@ -223,7 +223,7 @@ configString = "payment.properties"; } - if (authTrans == null){ + if (authTrans == null) { authTrans = PaymentGatewayServices.getAuthTransaction(paymentPref); } Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java Fri Mar 6 17:31:13 2009 @@ -79,7 +79,7 @@ if (pk == null) return; Map lookupCaches = (Map)session.getAttribute("lookupCaches"); - if(lookupCaches == null){ + if(lookupCaches == null) { lookupCaches = FastMap.newInstance(); session.setAttribute("lookupCaches", lookupCaches); } @@ -100,7 +100,7 @@ String cacheEntityName = entityName; LifoSet lkupCache = (LifoSet)lookupCaches.get(cacheEntityName); - if(lkupCache == null){ + if(lkupCache == null) { lkupCache = new LifoSet(); lookupCaches.put(cacheEntityName, lkupCache); } @@ -113,7 +113,7 @@ String cacheEntityName = entityName; LifoSet lkupCache = (LifoSet)lookupCaches.get(cacheEntityName); - if(lkupCache == null){ + if(lkupCache == null) { lkupCache = new LifoSet(); lookupCaches.put(cacheEntityName, lkupCache); } @@ -162,7 +162,7 @@ String entityName, GenericEntity ent) { HttpSession session = request.getSession(); Map currentEntityMap = (Map)session.getAttribute("currentEntityMap"); - if(currentEntityMap == null){ + if(currentEntityMap == null) { currentEntityMap = FastMap.newInstance(); session.setAttribute("currentEntityMap", currentEntityMap); } @@ -218,7 +218,7 @@ HttpSession session = request.getSession(); Map currentEntityMap = (Map)session.getAttribute("currentEntityMap"); - if(currentEntityMap == null){ + if(currentEntityMap == null) { currentEntityMap = FastMap.newInstance(); session.setAttribute("currentEntityMap", currentEntityMap); } @@ -271,14 +271,14 @@ oPassed = passedPK.get(ky); if(oPassed != null) { sPassed = oPassed.toString(); - if(UtilValidate.isEmpty(sPassed)){ + if(UtilValidate.isEmpty(sPassed)) { // If any part of passed key is not available, it can't be used usePassed = false; } else { oCached = cachedPK.get(ky); if(oCached != null) { sCached = oCached.toString(); - if(UtilValidate.isEmpty(sCached)){ + if(UtilValidate.isEmpty(sCached)) { useCached = false; } else { } Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ConvertTree.java Fri Mar 6 17:31:13 2009 @@ -73,11 +73,11 @@ try { BufferedReader input = null; try{ - if(!UtilValidate.isEmpty(file)){ + if(!UtilValidate.isEmpty(file)) { input = new BufferedReader( new FileReader(file)); String line = null; int size=0; - if(file != null){ + if(file != null) { int counterLine=0; //Home Document Entity = null; @@ -115,13 +115,13 @@ contentAssoc.put("userLogin", userLogin); dispatcher.runSync("createContentAssoc", contentAssoc); int recordCount = 0; - while (( line = input.readLine()) != null){//start line + while (( line = input.readLine()) != null) {//start line boolean hasFolder=true; String rootContent=null, contentId = null; counterLine++; - if(counterLine>1){ + if(counterLine>1) { size = line.length(); String check = "\\", @@ -133,33 +133,33 @@ size = data.length(); List<GenericValue> contents = null; - for(int index = 0; index< size; index++){//start character in line + for(int index = 0; index< size; index++) {//start character in line boolean contentNameMatch = false; int contentAssocSize=0; List<GenericValue> contentAssocs = null; if (data.charAt(index) == check.charAt(0)||data.charAt(index)== checkSubContent.charAt(0)) {//store data contentName = contentName + contentNameInprogress; - if(contentName.length()>100){ + if(contentName.length()>100) { contentName = contentName.substring(0,100); } //check duplicate folder contents = delegator.findByAnd("Content", UtilMisc.toMap("contentName",contentName)); - if(contents.size() > 0){ + if(contents.size() > 0) { GenericValue contentResult = contents.get(0); contentId = contentResult.get("contentId").toString(); } - if(contents.size() > 0 && hasFolder==true){ + if(contents.size() > 0 && hasFolder==true) { GenericValue contentResult = contents.get(0); contentId = contentResult.get("contentId").toString(); - if(rootContent != null){ + if(rootContent != null) { contentAssocs= delegator.findByAnd("ContentAssoc", UtilMisc.toMap("contentId",contentId, "contentIdTo", rootContent)); List<GenericValue> contentAssocCheck= delegator.findByAnd("ContentAssoc", UtilMisc.toMap("contentIdTo", rootContent)); Iterator<GenericValue> contentAssChecks = contentAssocCheck.iterator(); - while(contentAssChecks.hasNext() && contentNameMatch == false){ + while(contentAssChecks.hasNext() && contentNameMatch == false) { GenericValue contentAss = contentAssChecks.next(); GenericValue contentcheck = delegator.findByPrimaryKey("Content",UtilMisc.toMap("contentId",contentAss.get("contentId"))); - if(contentcheck!=null){ - if(contentcheck.get("contentName").equals(contentName) && contentNameMatch==false){ + if(contentcheck!=null) { + if(contentcheck.get("contentName").equals(contentName) && contentNameMatch==false) { contentNameMatch = true; contentId = contentcheck.get("contentId").toString(); } @@ -173,7 +173,7 @@ contentAssocSize=contentAssocs.size(); } - if( contentAssocSize == 0 && contentNameMatch==false){//New Root Content + if( contentAssocSize == 0 && contentNameMatch==false) {//New Root Content Entity = null; contentId = delegator.getNextSeqId("Content"); Entity = delegator.makeValue("Content"); @@ -194,12 +194,12 @@ hasFolder = true; } //Relation Content - if(rootContent==null){ + if(rootContent==null) { rootContent = "HOME_DUCUMENT"; } contentAssocs = delegator.findByAnd("ContentAssoc", UtilMisc.toMap("contentId",contentId,"contentIdTo",rootContent,"contentAssocTypeId","TREE_CHILD")); - if(contentAssocs.size()==0){ + if(contentAssocs.size()==0) { contentAssoc = FastMap.newInstance(); contentAssoc.put("contentId", contentId); contentAssoc.put("contentAssocTypeId", "TREE_CHILD"); @@ -214,14 +214,14 @@ contentName = ""; contentNameInprogress=""; } - if(data.charAt(index)== checkSubContent.charAt(0)){//Have sub content + if(data.charAt(index)== checkSubContent.charAt(0)) {//Have sub content createSubContent(index, data, rootContent, context, dctx); index=size; continue; } - if((data.charAt(index))!= check.charAt(0)){ + if((data.charAt(index))!= check.charAt(0)) { contentNameInprogress = contentNameInprogress.concat(Character.toString(data.charAt(index))); - if(contentNameInprogress.length()>99){ + if(contentNameInprogress.length()>99) { contentName = contentName + contentNameInprogress; contentNameInprogress=""; } @@ -238,15 +238,15 @@ input.close(); } return ServiceUtil.returnSuccess(sucMsg); - }catch(IOException e){ + }catch(IOException e) { errMsg = "IOException "+ UtilMisc.toMap("errMessage", e.toString()); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); - }catch(GenericServiceException e){ + }catch(GenericServiceException e) { errMsg = "GenericServiceException "+ UtilMisc.toMap("errMessage", e.toString()); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); - }catch(GenericEntityException e){ + }catch(GenericEntityException e) { errMsg = "GenericEntityException "+ UtilMisc.toMap("errMessage", e.toString()); Debug.logError(e, errMsg, module); e.printStackTrace(); @@ -272,29 +272,29 @@ subContents = subContents.replace(oldChar, newChar); int size = subContents.length(); try{ - for(index = 0; index < size; index++){//start character in line + for(index = 0; index < size; index++) {//start character in line boolean contentNameMatch = false; if (subContents.charAt(index) == check.charAt(0)) {//store data contentName = contentName + contentNameInprogress; //Debug.log("subcontentName---->"+contentName); - if(contentName.length()>100){ + if(contentName.length()>100) { contentName = contentName.substring(0,100); } List<GenericValue> contents = delegator.findByAnd("Content", UtilMisc.toMap("contentName",contentName),null,"-contentId"); - if(contents!=null){ + if(contents!=null) { Iterator<GenericValue> contentCheck = contents.iterator(); - while(contentCheck.hasNext() && contentNameMatch==false){ + while(contentCheck.hasNext() && contentNameMatch==false) { GenericValue contentch = contentCheck.next(); - if(contentch!=null){ + if(contentch!=null) { List<GenericValue> contentAssocsChecks = delegator.findByAnd("ContentAssoc", UtilMisc.toMap("contentId",contentch.get("contentId"), "contentIdTo", rootContent)); - if(contentAssocsChecks.size() > 0){ + if(contentAssocsChecks.size() > 0) { contentNameMatch = true; } } } } contentId = null; - if(contentNameMatch==false){ + if(contentNameMatch==false) { //create DataResource Map<String,Object> data = FastMap.newInstance(); data.put("userLogin", userLogin); @@ -330,31 +330,31 @@ contentNameInprogress=""; } - if((subContents.charAt(index))!= check.charAt(0)){ + if((subContents.charAt(index))!= check.charAt(0)) { contentNameInprogress = contentNameInprogress.concat(Character.toString(subContents.charAt(index))); - if(contentNameInprogress.length() > 99){ + if(contentNameInprogress.length() > 99) { contentName = contentName + contentNameInprogress; contentNameInprogress=""; } } //lastItem - if(index==size-1){ + if(index==size-1) { contentNameMatch = false; List<GenericValue> contents = delegator.findByAnd("Content", UtilMisc.toMap("contentName",contentName)); - if(contents!=null){ + if(contents!=null) { Iterator<GenericValue> contentCheck = contents.iterator(); - while(contentCheck.hasNext() && contentNameMatch==false){ + while(contentCheck.hasNext() && contentNameMatch==false) { GenericValue contentch = contentCheck.next(); - if(contentch!=null){ + if(contentch!=null) { List<GenericValue> contentAssocsChecks = delegator.findByAnd("ContentAssoc", UtilMisc.toMap("contentId",contentch.get("contentId"), "contentIdTo", rootContent)); - if(contentAssocsChecks.size() > 0){ + if(contentAssocsChecks.size() > 0) { contentNameMatch = true; } } } } contentId = null; - if(contentNameMatch == false){ + if(contentNameMatch == false) { //create DataResource Map<String,Object> data = FastMap.newInstance(); data.put("userLogin", userLogin); @@ -390,12 +390,12 @@ } return ServiceUtil.returnSuccess(sucMsg); - }catch(GenericEntityException e){ + }catch(GenericEntityException e) { errMsg = "GenericEntityException "+ UtilMisc.toMap("errMessage", e.toString()); Debug.logError(e, errMsg, module); e.printStackTrace(); return ServiceUtil.returnError(errMsg); - }catch(GenericServiceException e){ + }catch(GenericServiceException e) { errMsg = "GenericServiceException"+ UtilMisc.toMap("errMessage", e.toString()); Debug.logError(e, errMsg, module); e.printStackTrace(); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java Fri Mar 6 17:31:13 2009 @@ -112,7 +112,7 @@ context.put("contentIdTo", formInput.get("contentIdTo")); context.put("textData", formInput.get("textData")); String contentPurposeTypeId = (String)formInput.get("contentPurposeTypeId"); - if (UtilValidate.isNotEmpty(contentPurposeTypeId)){ + if (UtilValidate.isNotEmpty(contentPurposeTypeId)) { context.put("contentPurposeList", UtilMisc.toList(contentPurposeTypeId)); } Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/layout/LayoutWorker.java Fri Mar 6 17:31:13 2009 @@ -85,7 +85,7 @@ formInput.put(fieldName, fieldStr); //Debug.logVerbose("in uploadAndStoreImage, fieldName:" + fieldName + " fieldStr:" + fieldStr, ""); } - if (fieldName.equals(uploadField)){ + if (fieldName.equals(uploadField)) { imageFi = fi; //MimeType of upload file results.put("uploadMimeType", fi.getContentType()); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java Fri Mar 6 17:31:13 2009 @@ -174,7 +174,7 @@ if (UtilValidate.isNotEmpty(contentId)) { try { content = delegator.findByPrimaryKey("Content", UtilMisc.toMap("contentId", contentId)); - } catch(GenericEntityException e){ + } catch(GenericEntityException e) { // TODO: Not sure what to put here. throw new RuntimeException(e.getMessage()); } Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java (original) +++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java Fri Mar 6 17:31:13 2009 @@ -99,7 +99,7 @@ * test if the productionRun exist. * @return true if it exist false otherwise. **/ - public boolean exist(){ + public boolean exist() { return productionRun != null; } @@ -107,7 +107,7 @@ * get the ProductionRun GenericValue . * @return the ProductionRun GenericValue **/ - public GenericValue getGenericValue(){ + public GenericValue getGenericValue() { return productionRun; } /** @@ -120,7 +120,7 @@ **/ public boolean store() { if (exist()) { - if (updateCompletionDate){ + if (updateCompletionDate) { this.estimatedCompletionDate = recalculateEstimatedCompletionDate(); } productionRun.set("estimatedStartDate",this.estimatedStartDate); @@ -135,13 +135,13 @@ quantityIsUpdated = false; } if (productionRunRoutingTasks != null) { - for (Iterator iter = productionRunRoutingTasks.iterator(); iter.hasNext();){ + for (Iterator iter = productionRunRoutingTasks.iterator(); iter.hasNext();) { GenericValue routingTask = (GenericValue) iter.next(); routingTask.store(); } } if (productionRunComponents != null) { - for (Iterator iter = productionRunComponents.iterator(); iter.hasNext();){ + for (Iterator iter = productionRunComponents.iterator(); iter.hasNext();) { GenericValue component = (GenericValue) iter.next(); component.store(); } @@ -160,7 +160,7 @@ * In the same time this method read the quantity property from SGBD * @return the productProduced related object **/ - public GenericValue getProductProduced(){ + public GenericValue getProductProduced() { if (exist()) { if (productProduced == null) { try { @@ -181,7 +181,7 @@ * get the quantity property. * @return the quantity property **/ - public BigDecimal getQuantity(){ + public BigDecimal getQuantity() { if (exist()) { if (quantity == null) getProductProduced(); return quantity; @@ -199,7 +199,7 @@ this.quantityIsUpdated = true; this.updateCompletionDate = true; if (productionRunComponents == null) getProductionRunComponents(); - for (Iterator iter = productionRunComponents.iterator(); iter.hasNext();){ + for (Iterator iter = productionRunComponents.iterator(); iter.hasNext();) { GenericValue component = (GenericValue) iter.next(); componentQuantity = component.getBigDecimal("estimatedQuantity"); component.set("estimatedQuantity", componentQuantity.divide(previousQuantity, 10, BigDecimal.ROUND_HALF_UP).multiply(newQuantity)); @@ -209,14 +209,14 @@ * get the estimatedStartDate property. * @return the estimatedStartDate property **/ - public Timestamp getEstimatedStartDate(){ + public Timestamp getEstimatedStartDate() { return (exist()? this.estimatedStartDate: null); } /** * set the estimatedStartDate property. * @return **/ - public void setEstimatedStartDate(Timestamp estimatedStartDate){ + public void setEstimatedStartDate(Timestamp estimatedStartDate) { this.estimatedStartDate = estimatedStartDate; this.updateCompletionDate = true; } @@ -224,7 +224,7 @@ * get the estimatedCompletionDate property. * @return the estimatedCompletionDate property **/ - public Timestamp getEstimatedCompletionDate(){ + public Timestamp getEstimatedCompletionDate() { if (exist()) { if (updateCompletionDate) { this.estimatedCompletionDate = recalculateEstimatedCompletionDate(); @@ -238,7 +238,7 @@ * usage productionRun.setEstimatedCompletionDate(productionRun.recalculateEstimatedCompletionDate(priority); * @return **/ - public void setEstimatedCompletionDate(Timestamp estimatedCompletionDate){ + public void setEstimatedCompletionDate(Timestamp estimatedCompletionDate) { this.estimatedCompletionDate = estimatedCompletionDate; } /** @@ -249,14 +249,14 @@ * @param priority give the routingTask start point to recalculated * @return the estimatedCompletionDate calculated **/ - public Timestamp recalculateEstimatedCompletionDate(Long priority, Timestamp startDate){ + public Timestamp recalculateEstimatedCompletionDate(Long priority, Timestamp startDate) { if (exist()) { getProductionRunRoutingTasks(); if (quantity == null) getQuantity(); Timestamp endDate=null; - for (Iterator iter=productionRunRoutingTasks.iterator(); iter.hasNext();){ + for (Iterator iter=productionRunRoutingTasks.iterator(); iter.hasNext();) { GenericValue routingTask = (GenericValue) iter.next(); - if (priority.compareTo(routingTask.getLong("priority")) <= 0){ + if (priority.compareTo(routingTask.getLong("priority")) <= 0) { // Calculate the estimatedCompletionDate long totalTime = ProductionRun.getEstimatedTaskTime(routingTask, quantity, dispatcher); endDate = TechDataServices.addForward(TechDataServices.getTechDataCalendar(routingTask),startDate, totalTime); @@ -274,7 +274,7 @@ /** * call recalculateEstimatedCompletionDate(0,estimatedStartDate), so recalculated for all the routingtask. */ - public Timestamp recalculateEstimatedCompletionDate(){ + public Timestamp recalculateEstimatedCompletionDate() { this.updateCompletionDate = false; return recalculateEstimatedCompletionDate(new Long(0), estimatedStartDate); } @@ -282,29 +282,29 @@ * get the productionRunName property. * @return the productionRunName property **/ - public String getProductionRunName(){ + public String getProductionRunName() { if (exist()) return this.productionRunName; else return null; } - public void setProductionRunName(String name){ + public void setProductionRunName(String name) { this.productionRunName = name; } /** * get the description property. * @return the description property **/ - public String getDescription(){ + public String getDescription() { if (exist()) return productionRun.getString("description"); else return null; } - public void setDescription(String description){ + public void setDescription(String description) { this.description = description; } /** * get the GenericValue currentStatus. * @return the currentStatus related object **/ - public GenericValue getCurrentStatus(){ + public GenericValue getCurrentStatus() { if (exist()) { if (currentStatus == null) { try { @@ -321,7 +321,7 @@ * get the list of all the productionRunComponents as a list of GenericValue. * @return the productionRunComponents related object **/ - public List getProductionRunComponents(){ + public List getProductionRunComponents() { if (exist()) { if (productionRunComponents == null) { if (productionRunRoutingTasks == null) this.getProductionRunRoutingTasks(); @@ -346,7 +346,7 @@ * get the list of all the productionRunRoutingTasks as a list of GenericValue. * @return the productionRunRoutingTasks related object **/ - public List getProductionRunRoutingTasks(){ + public List getProductionRunRoutingTasks() { if (exist()) { if (productionRunRoutingTasks == null) { try { @@ -364,7 +364,7 @@ * get the list of all the productionRunRoutingTasks as a list of GenericValue. * @return the productionRunRoutingTasks related object **/ - public GenericValue getLastProductionRunRoutingTask(){ + public GenericValue getLastProductionRunRoutingTask() { if (exist()) { if (productionRunRoutingTasks == null) { try { @@ -383,7 +383,7 @@ * This methode is used when the routingTasks ordering is changed. * @return **/ - public void clearRoutingTasksList(){ + public void clearRoutingTasksList() { this.productionRunRoutingTasks = null; } Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java (original) +++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java Fri Mar 6 17:31:13 2009 @@ -95,7 +95,7 @@ String productionRunId = (String) context.get("productionRunId"); ProductionRun productionRun = new ProductionRun(productionRunId, delegator, dispatcher); - if (!productionRun.exist()){ + if (!productionRun.exist()) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunNotExists", locale)); } String currentStatusId = productionRun.getGenericValue().getString("currentStatusId"); @@ -458,7 +458,7 @@ if (!UtilValidate.isEmpty(productionRunId)) { ProductionRun productionRun = new ProductionRun(productionRunId, delegator, dispatcher); - if (productionRun.exist()){ + if (productionRun.exist()) { if (!"PRUN_CREATED".equals(productionRun.getGenericValue().getString("currentStatusId")) && !"PRUN_SCHEDULED".equals(productionRun.getGenericValue().getString("currentStatusId"))) { @@ -525,7 +525,7 @@ String statusId = (String) context.get("statusId"); ProductionRun productionRun = new ProductionRun(productionRunId, delegator, dispatcher); - if (!productionRun.exist()){ + if (!productionRun.exist()) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunNotExists", locale)); } String currentStatusId = productionRun.getGenericValue().getString("currentStatusId"); @@ -707,7 +707,7 @@ } ProductionRun productionRun = new ProductionRun(productionRunId, delegator, dispatcher); - if (!productionRun.exist()){ + if (!productionRun.exist()) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunNotExists", locale)); } List tasks = productionRun.getProductionRunRoutingTasks(); @@ -1072,7 +1072,7 @@ String routingTaskId = (String) context.get("routingTaskId"); if (! UtilValidate.isEmpty(productionRunId) && ! UtilValidate.isEmpty(routingTaskId)) { ProductionRun productionRun = new ProductionRun(productionRunId, delegator, dispatcher); - if (productionRun.exist()){ + if (productionRun.exist()) { if (!"PRUN_CREATED".equals(productionRun.getGenericValue().getString("currentStatusId")) && !"PRUN_SCHEDULED".equals(productionRun.getGenericValue().getString("currentStatusId"))) { @@ -1092,20 +1092,20 @@ Long priority = (Long) context.get("priority"); List pRRoutingTasks = productionRun.getProductionRunRoutingTasks(); boolean first = true; - for (Iterator iter=pRRoutingTasks.iterator();iter.hasNext();){ + for (Iterator iter=pRRoutingTasks.iterator();iter.hasNext();) { GenericValue routingTask = (GenericValue) iter.next(); if (priority.equals(routingTask.get("priority")) && ! routingTaskId.equals(routingTask.get("workEffortId"))) return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingRoutingTaskSeqIdAlreadyExist", locale)); - if (routingTaskId.equals(routingTask.get("workEffortId"))){ + if (routingTaskId.equals(routingTask.get("workEffortId"))) { routingTask.set("estimatedSetupMillis", context.get("estimatedSetupMillis")); routingTask.set("estimatedMilliSeconds", context.get("estimatedMilliSeconds")); - if (first){ // for the first routingTask the estimatedStartDate update imply estimatedStartDate productonRun update - if (! estimatedStartDate.equals(pRestimatedStartDate)){ + if (first) { // for the first routingTask the estimatedStartDate update imply estimatedStartDate productonRun update + if (! estimatedStartDate.equals(pRestimatedStartDate)) { productionRun.setEstimatedStartDate(estimatedStartDate); } } // the priority has been changed - if (! priority.equals(routingTask.get("priority"))){ + if (! priority.equals(routingTask.get("priority"))) { routingTask.set("priority", priority); // update the routingTask List and re-read it to be able to have it sorted with the new value if ( ! productionRun.store()) { @@ -1908,7 +1908,7 @@ } ProductionRun productionRun = new ProductionRun(productionRunId, delegator, dispatcher); - if (!productionRun.exist()){ + if (!productionRun.exist()) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunNotExists", locale)); } List tasks = productionRun.getProductionRunRoutingTasks(); @@ -2543,7 +2543,7 @@ String productionRunId = (String) context.get("productionRunId"); ProductionRun productionRun = new ProductionRun(productionRunId, delegator, dispatcher); - if (!productionRun.exist()){ + if (!productionRun.exist()) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunNotExists", locale)); } List tasks = productionRun.getProductionRunRoutingTasks(); @@ -2578,7 +2578,7 @@ String productionRunId = (String) context.get("productionRunId"); ProductionRun productionRun = new ProductionRun(productionRunId, delegator, dispatcher); - if (!productionRun.exist()){ + if (!productionRun.exist()) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunNotExists", locale)); } List tasks = productionRun.getProductionRunRoutingTasks(); @@ -2923,7 +2923,7 @@ iteratorResult = resultList.iterator(); String orderId = null; GenericValue orderDeliverySchedule = null; - while (iteratorResult.hasNext()){ + while (iteratorResult.hasNext()) { GenericValue genericResult = (GenericValue) iteratorResult.next(); String newOrderId = genericResult.getString("orderId"); if (!newOrderId.equals(orderId)) { Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java (original) +++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java Fri Mar 6 17:31:13 2009 @@ -82,7 +82,7 @@ Debug.logError(e,"Error : findList(\"MrpEvent\", null, null, null, null, false)", module); return ServiceUtil.returnError("Problem, we can not find all the items of MrpEvent, for more detail look at the log"); } - if (listResult != null){ + if (listResult != null) { try{ delegator.removeAll(listResult); } catch(GenericEntityException e) { @@ -99,10 +99,10 @@ } catch(GenericEntityException e) { return ServiceUtil.returnError("Problem, we can not find all the items of MrpEvent, for more detail look at the log"); } - if (listResult != null){ + if (listResult != null) { try{ Iterator listResultIt = listResult.iterator(); - while (listResultIt.hasNext()){ + while (listResultIt.hasNext()) { GenericValue tmpRequirement = (GenericValue)listResultIt.next(); listResultRoles.addAll(tmpRequirement.getRelated("RequirementRole")); //int numOfRecordsRemoved = delegator.removeRelated("RequirementRole", tmpRequirement); @@ -119,7 +119,7 @@ } catch(GenericEntityException e) { return ServiceUtil.returnError("Problem, we can not find all the items of MrpEvent, for more detail look at the log"); } - if (listResult != null){ + if (listResult != null) { try{ delegator.removeAll(listResult); } catch(GenericEntityException e) { @@ -217,7 +217,7 @@ return ServiceUtil.returnError("Problem, we can not find all the items of MrpEvent, for more detail look at the log"); } iteratorResult = resultList.iterator(); - while(iteratorResult.hasNext()){ + while(iteratorResult.hasNext()) { genericResult = (GenericValue) iteratorResult.next(); String productId = genericResult.getString("productId"); BigDecimal eventQuantityTmp = genericResult.getBigDecimal("quantity"); @@ -328,7 +328,7 @@ return ServiceUtil.returnError("Problem, we can not find the order items, for more detail look at the log"); } iteratorResult = resultList.iterator(); - while(iteratorResult.hasNext()){ + while(iteratorResult.hasNext()) { genericResult = (GenericValue) iteratorResult.next(); String productId = genericResult.getString("productId"); BigDecimal eventQuantityTmp = genericResult.getBigDecimal("estimatedQuantity").negate(); @@ -360,7 +360,7 @@ return ServiceUtil.returnError("Problem, we can not find the order items, for more detail look at the log"); } iteratorResult = resultList.iterator(); - while(iteratorResult.hasNext()){ + while(iteratorResult.hasNext()) { genericResult = (GenericValue) iteratorResult.next(); if ("PRUN_CLOSED".equals(genericResult.getString("currentStatusId"))) { continue; @@ -405,7 +405,7 @@ return ServiceUtil.returnError("Unable to retrieve ProductFacility records."); } iteratorResult = resultList.iterator(); - while(iteratorResult.hasNext()){ + while(iteratorResult.hasNext()) { genericResult = (GenericValue) iteratorResult.next(); String productId = genericResult.getString("productId"); BigDecimal minimumStock = genericResult.getBigDecimal("minimumStock"); @@ -756,7 +756,7 @@ } stockTmp = stockTmp.add(eventQuantity); - if(stockTmp.compareTo(minimumStock) < 0){ + if(stockTmp.compareTo(minimumStock) < 0) { BigDecimal qtyToStock = minimumStock.subtract(stockTmp); //need to buy or build the product as we have not enough stock eventDate = inventoryEventForMRP.getTimestamp("eventDate"); Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java (original) +++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java Fri Mar 6 17:31:13 2009 @@ -76,14 +76,14 @@ * get the quantity property. * @return the quantity property **/ - public BigDecimal getQuantity(){ + public BigDecimal getQuantity() { return quantity; } /** * get the requirementStartDate property. * @return the quantity property **/ - public Timestamp getRequirementStartDate(){ + public Timestamp getRequirementStartDate() { return requirementStartDate; } /** @@ -97,7 +97,7 @@ * <li>if ProposedOrder.isBuild a Map with all the routingTaskId as keys and estimatedStartDate as value. * <li>else null. **/ - public Map calculateStartDate(int daysToShip, GenericValue routing, GenericDelegator delegator, LocalDispatcher dispatcher, GenericValue userLogin){ + public Map calculateStartDate(int daysToShip, GenericValue routing, GenericDelegator delegator, LocalDispatcher dispatcher, GenericValue userLogin) { Map result = null; Timestamp endDate = (Timestamp)requiredByDate.clone(); Timestamp startDate = endDate; @@ -203,7 +203,7 @@ * Read the first ProductFacility.reorderQuantity and calculate the quantity : if (quantity < reorderQuantity) quantity = reorderQuantity; **/ // FIXME: facilityId - public void calculateQuantityToSupply(BigDecimal reorderQuantity, BigDecimal minimumStock, ListIterator listIterIEP){ + public void calculateQuantityToSupply(BigDecimal reorderQuantity, BigDecimal minimumStock, ListIterator listIterIEP) { // TODO : use a better algorithm using Order management cost et Product Stock cost to calculate the re-order quantity // the variable listIterIEP will be used for that if (quantity.compareTo(reorderQuantity) < 0) { Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java (original) +++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java Fri Mar 6 17:31:13 2009 @@ -166,7 +166,7 @@ Debug.logError("Pb reading FixedAsset associated with routingTask"+e.getMessage(), module); } if (machineGroup != null) { - if (machineGroup.getString("calendarId") != null){ + if (machineGroup.getString("calendarId") != null) { try{ techDataCalendar = machineGroup.getRelatedOneCache("TechDataCalendar"); } catch (GenericEntityException e) { @@ -207,7 +207,7 @@ Double capacity = null; Time startTime = null; while (capacity == null || capacity.doubleValue()==0) { - switch( dayStart){ + switch( dayStart) { case Calendar.MONDAY: capacity = techDataCalendarWeek.getDouble("mondayCapacity"); startTime = techDataCalendarWeek.getTime("mondayStartTime"); @@ -331,7 +331,7 @@ public static Timestamp addForward(GenericValue techDataCalendar, Timestamp dateFrom, long amount) { Timestamp dateTo = (Timestamp) dateFrom.clone(); long nextCapacity = capacityRemaining(techDataCalendar, dateFrom); - if (amount <= nextCapacity){ + if (amount <= nextCapacity) { dateTo.setTime(dateTo.getTime()+amount); amount = 0; }else amount -= nextCapacity; @@ -341,7 +341,7 @@ result = startNextDay(techDataCalendar, dateTo); dateTo = (Timestamp) result.get("dateTo"); nextCapacity = ((Double) result.get("nextCapacity")).longValue(); - if (amount <= nextCapacity){ + if (amount <= nextCapacity) { dateTo.setTime(dateTo.getTime()+amount); amount = 0; }else amount -= nextCapacity; @@ -362,7 +362,7 @@ Double capacity = null; Time startTime = null; while (capacity == null || capacity.doubleValue() == 0) { - switch( dayEnd){ + switch( dayEnd) { case Calendar.MONDAY: capacity = techDataCalendarWeek.getDouble("mondayCapacity"); startTime = techDataCalendarWeek.getTime("mondayStartTime"); @@ -487,7 +487,7 @@ public static Timestamp addBackward(GenericValue techDataCalendar, Timestamp dateFrom, long amount) { Timestamp dateTo = (Timestamp) dateFrom.clone(); long previousCapacity = capacityRemainingBackward(techDataCalendar, dateFrom); - if (amount <= previousCapacity){ + if (amount <= previousCapacity) { dateTo.setTime(dateTo.getTime()-amount); amount = 0; }else amount -= previousCapacity; @@ -497,7 +497,7 @@ result = endPreviousDay(techDataCalendar, dateTo); dateTo = (Timestamp) result.get("dateTo"); previousCapacity = ((Double) result.get("previousCapacity")).longValue(); - if (amount <= previousCapacity){ + if (amount <= previousCapacity) { dateTo.setTime(dateTo.getTime()-amount); amount = 0; }else amount -= previousCapacity; Modified: ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java (original) +++ ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java Fri Mar 6 17:31:13 2009 @@ -459,10 +459,10 @@ // find the referred timestamp cookie if it exists if ("Ofbiz.TKCD.UpdatedTimeStamp".equals(cookieName)) { String affiliateReferredTime = cookies[i].getValue(); - if (affiliateReferredTime !=null && !affiliateReferredTime.equals("")){ + if (affiliateReferredTime !=null && !affiliateReferredTime.equals("")) { try{ affiliateReferredTimeStamp = Timestamp.valueOf(affiliateReferredTime); - }catch (IllegalArgumentException e){ + }catch (IllegalArgumentException e) { Debug.logError(e, "Error parsing affiliateReferredTimeStamp value from cookie", module); } } Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Fri Mar 6 17:31:13 2009 @@ -235,7 +235,7 @@ if (chargedToPaymentPref.compareTo(ZERO) > 0) { // key of the resulting map is paymentMethodId or paymentMethodTypeId if the paymentMethodId is not available String paymentMethodKey = paymentPref.getString("paymentMethodId") != null ? paymentPref.getString("paymentMethodId") : paymentPref.getString("paymentMethodTypeId"); - if(paymentMethodAmounts.containsKey(paymentMethodKey)){ + if(paymentMethodAmounts.containsKey(paymentMethodKey)) { BigDecimal value = (BigDecimal) paymentMethodAmounts.get(paymentMethodKey); if (value != null) chargedToPaymentPref = chargedToPaymentPref.add(value); } @@ -2480,10 +2480,10 @@ List promoAdjustments = EntityUtil.filterByAnd(allOrderAdjustments, UtilMisc.toMap("orderAdjustmentTypeId", "PROMOTION_ADJUSTMENT")); - if(!promoAdjustments.isEmpty()){ + if(!promoAdjustments.isEmpty()) { Iterator promoAdjIter = promoAdjustments.iterator(); - while(promoAdjIter.hasNext()){ + while(promoAdjIter.hasNext()) { GenericValue promoAdjustment = (GenericValue) promoAdjIter.next(); if (promoAdjustment != null) { @@ -2495,7 +2495,7 @@ return promoAdjTotal.setScale(scale, rounding); } - public static BigDecimal getWorkEffortRentalLength(GenericValue workEffort){ + public static BigDecimal getWorkEffortRentalLength(GenericValue workEffort) { BigDecimal length = null; if (workEffort.get("estimatedStartDate") != null && workEffort.get("estimatedCompletionDate") != null) { length = new BigDecimal(UtilDateTime.getInterval(workEffort.getTimestamp("estimatedStartDate"),workEffort.getTimestamp("estimatedCompletionDate"))/86400000); @@ -2503,7 +2503,7 @@ return length; } - public static BigDecimal getWorkEffortRentalQuantity(GenericValue workEffort){ + public static BigDecimal getWorkEffortRentalQuantity(GenericValue workEffort) { BigDecimal persons = BigDecimal.ONE; if (workEffort.get("reservPersons") != null) persons = workEffort.getBigDecimal("reservPersons"); @@ -2787,7 +2787,7 @@ } // little helper method to set the scale according to tax type - public static BigDecimal setScaleByType(boolean isTax, BigDecimal value){ + public static BigDecimal setScaleByType(boolean isTax, BigDecimal value) { return isTax ? value.setScale(taxCalcScale, taxRounding) : value.setScale(scale, rounding); } Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Fri Mar 6 17:31:13 2009 @@ -878,7 +878,7 @@ Map serviceResult = null; try { serviceResult = dispatcher.runSync("checkPaymentAmountForRefund", UtilMisc.toMap("returnId", returnId)); - } catch (GenericServiceException e){ + } catch (GenericServiceException e) { Debug.logError(e, "Problem running the checkPaymentAmountForRefund service", module); return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderProblemsWithCheckPaymentAmountForRefund", locale)); } @@ -922,7 +922,7 @@ Map acctgPreferencesResult = null; try { acctgPreferencesResult = dispatcher.runSync("getPartyAccountingPreferences", UtilMisc.toMap("organizationPartyId", productStore.get("payToPartyId"), "userLogin", userLogin)); - } catch (GenericServiceException e){ + } catch (GenericServiceException e) { Debug.logError(e, "Error retrieving PartyAcctgPreference for partyId " + productStore.get("payToPartyId"), module); return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderProblemsWithGetPartyAcctgPreferences", locale)); } @@ -2169,7 +2169,7 @@ } // used as a dispatch service, invoke different service based on the parameters passed in - public static Map createReturnItemOrAdjustment(DispatchContext dctx, Map context){ + public static Map createReturnItemOrAdjustment(DispatchContext dctx, Map context) { Debug.logInfo("createReturnItemOrAdjustment's context:" + context, module); String orderItemSeqId = (String) context.get("orderItemSeqId"); Debug.logInfo("orderItemSeqId:" + orderItemSeqId +"#", module); @@ -2192,7 +2192,7 @@ } // used as a dispatch service, invoke different service based on the parameters passed in - public static Map updateReturnItemOrAdjustment(DispatchContext dctx, Map context){ + public static Map updateReturnItemOrAdjustment(DispatchContext dctx, Map context) { Debug.logInfo("updateReturnItemOrAdjustment's context:" + context, module); String returnAdjustmentId = (String) context.get("returnAdjustmentId"); Debug.logInfo("returnAdjustmentId:" + returnAdjustmentId +"#", module); @@ -2269,7 +2269,7 @@ String paramName = modelParam.name; Object value = context.get(paramName); - if(value != null){ + if(value != null) { serviceContext.put(paramName, value); } } Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Fri Mar 6 17:31:13 2009 @@ -2032,7 +2032,7 @@ orderItem.set("statusId", statusId); toBeStored.add(orderItem); - if (statusDateTime == null){ + if (statusDateTime == null) { statusDateTime = UtilDateTime.nowTimestamp(); } // now create a status change @@ -3159,7 +3159,7 @@ } /** Service to invoice service items from order*/ - public static Map invoiceServiceItems(DispatchContext dctx, Map context){ + public static Map invoiceServiceItems(DispatchContext dctx, Map context) { GenericDelegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -3249,7 +3249,7 @@ GenericValue productType = null; GenericValue product = (GenericValue) serviceProducts.get(item); boolean markComplete = false; - if(product != null){ + if(product != null) { try { productType = product.getRelatedOne("ProductType"); } catch (GenericEntityException e) { @@ -3552,7 +3552,7 @@ return result; } - public static Map loadCartForUpdate(DispatchContext dctx, Map context){ + public static Map loadCartForUpdate(DispatchContext dctx, Map context) { LocalDispatcher dispatcher = dctx.getDispatcher(); GenericDelegator delegator = dctx.getDelegator(); Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Fri Mar 6 17:31:13 2009 @@ -1495,7 +1495,7 @@ } if (paymentMethods != null && paymentMethods.size() > 0 && requiredAmount.compareTo(selectedPaymentTotal) < 0) { BigDecimal changeAmount = selectedPaymentTotal.subtract(requiredAmount); - if (!paymentTypes.contains("CASH")){ + if (!paymentTypes.contains("CASH")) { Debug.logError("Change Amount : " + changeAmount + " / No cash.", module); errMsg = UtilProperties.getMessage(resource_error, "checkhelper.change_returned_cannot_be_greater_than_cash", (cart != null ? cart.getLocale() : Locale.getDefault())); return ServiceUtil.returnError(errMsg); @@ -1503,7 +1503,7 @@ int cashIndex = paymentTypes.indexOf("CASH"); String cashId = (String) paymentTypes.get(cashIndex); BigDecimal cashAmount = cart.getPaymentAmount(cashId); - if (cashAmount.compareTo(changeAmount) < 0){ + if (cashAmount.compareTo(changeAmount) < 0) { Debug.logError("Change Amount : " + changeAmount + " / Cash Amount : " + cashAmount, module); errMsg = UtilProperties.getMessage(resource_error, "checkhelper.change_returned_cannot_be_greater_than_cash", (cart != null ? cart.getLocale() : Locale.getDefault())); return ServiceUtil.returnError(errMsg); Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Fri Mar 6 17:31:13 2009 @@ -2661,11 +2661,11 @@ orderTerms.clear(); } - public boolean isOrderTermSet(){ + public boolean isOrderTermSet() { return orderTermSet; } - public void setOrderTermSet(boolean orderTermSet){ + public void setOrderTermSet(boolean orderTermSet) { this.orderTermSet = orderTermSet; } @@ -2683,11 +2683,11 @@ return false; } - public boolean isReadOnlyCart(){ + public boolean isReadOnlyCart() { return readOnlyCart; } - public void setReadOnlyCart(boolean readOnlyCart){ + public void setReadOnlyCart(boolean readOnlyCart) { this.readOnlyCart = readOnlyCart; } Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Fri Mar 6 17:31:13 2009 @@ -162,7 +162,7 @@ Object object = paramMap.remove("add_product_id"); try{ productId = (String) object; - }catch(ClassCastException e){ + }catch(ClassCastException e) { productId = (String)((List)object).get(0); } } @@ -367,7 +367,7 @@ } //check accommodation for reservations - if((paramMap.containsKey("accommodationMapId")) && (paramMap.containsKey("accommodationSpotId"))){ + if((paramMap.containsKey("accommodationMapId")) && (paramMap.containsKey("accommodationSpotId"))) { accommodationMapId = (String) paramMap.remove("accommodationMapId"); accommodationSpotId = (String) paramMap.remove("accommodationSpotId"); } @@ -1584,7 +1584,7 @@ if (paramMap.containsKey("quantity" + thisSuffix)) { quantityStr = (String) paramMap.remove("quantity" + thisSuffix); } - if ((quantityStr == null) || (quantityStr.equals(""))){ // otherwise, every empty value causes an exception and makes the log ugly + if ((quantityStr == null) || (quantityStr.equals(""))) { // otherwise, every empty value causes an exception and makes the log ugly quantityStr = "0"; // default quantity is 0, so without a quantity input, this field will not be added } @@ -1617,11 +1617,11 @@ itemDesiredDeliveryDateStr = (String) paramMap.remove("itemDesiredDeliveryDate" + thisSuffix); } // get the item type - if (paramMap.containsKey("itemType" + thisSuffix)){ + if (paramMap.containsKey("itemType" + thisSuffix)) { itemType = (String) paramMap.remove("itemType" + thisSuffix); } - if (paramMap.containsKey("itemDescription" + thisSuffix)){ + if (paramMap.containsKey("itemDescription" + thisSuffix)) { itemDescription = (String) paramMap.remove("itemDescription" + thisSuffix); } @@ -1636,7 +1636,7 @@ itemGroupNumber, itemAttributes,null); // no values for price and paramMap (a context for adding attributes) controlDirective = processResult(result, request); - if (controlDirective.equals(ERROR)){ // if the add to cart failed, then get out of this loop right away + if (controlDirective.equals(ERROR)) { // if the add to cart failed, then get out of this loop right away return "error"; } } Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java Fri Mar 6 17:31:13 2009 @@ -678,7 +678,7 @@ } else if (parameterName.toUpperCase().startsWith("DESCRIPTION")) { itemDescription = quantString; // the quantString is actually the description if the field name starts with DESCRIPTION } else if (parameterName.startsWith("reservStart")) { - if (quantString.length() ==0){ + if (quantString.length() ==0) { // should have format: yyyy-mm-dd hh:mm:ss.fffffffff quantString += " 00:00:00.000000000"; } Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=750993&r1=750992&r2=750993&view=diff ============================================================================== --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java (original) +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Fri Mar 6 17:31:13 2009 @@ -1178,7 +1178,7 @@ this.setBasePrice(configWrapper.getTotalPrice()); // Check if price display with taxes GenericValue productStore = ProductStoreWorker.getProductStore(cart.getProductStoreId(), delegator); - if (UtilValidate.isNotEmpty(productStore) && "Y".equals(productStore.get("showPricesWithVatTax"))){ + if (UtilValidate.isNotEmpty(productStore) && "Y".equals(productStore.get("showPricesWithVatTax"))) { BigDecimal totalPrice = configWrapper.getTotalPrice(); // Get Taxes Map totalPriceWithTaxMap = dispatcher.runSync("calcTaxForDisplay", UtilMisc.toMap("basePrice", totalPrice, "productId", this.productId, "productStoreId", cart.getProductStoreId())); @@ -1839,7 +1839,7 @@ GenericValue product = getProduct(); if (product != null) { itemInfo.put("inShippingBox", product.getString("inShippingBox")); - if (product.getString("inShippingBox") != null && product.getString("inShippingBox").equals("Y")){ + if (product.getString("inShippingBox") != null && product.getString("inShippingBox").equals("Y")) { itemInfo.put("shippingHeight", product.getBigDecimal("shippingHeight")); itemInfo.put("shippingWidth", product.getBigDecimal("shippingWidth")); itemInfo.put("shippingDepth", product.getBigDecimal("shippingDepth")); @@ -2463,7 +2463,7 @@ } } } - public static String getPurchaseOrderItemDescription(GenericValue product, GenericValue supplierProduct, Locale locale){ + public static String getPurchaseOrderItemDescription(GenericValue product, GenericValue supplierProduct, Locale locale) { String itemDescription = ""; String supplierProductId = supplierProduct.getString("supplierProductId"); if (supplierProductId == null) { |
Free forum by Nabble | Edit this page |