On 20/11/2009, at 6:50 AM, Adam Heath wrote:
[email protected] wrote:Author: jleroux Date: Thu Nov 19 17:26:03 2009 New Revision: 882210URL: http://svn.apache.org/viewvc?rev=882210&view=rev Log:A patch from Marc Morin "Resolve java warnings exposed in Eclipse : application - accounting" (https://issues.apache.org/jira/browse/OFBIZ-3157 ) - OFBIZ-3157ยจPatch for generic's warnings for accounting applicationI will soon commit InvoiceWorker.java (got a conflict) and some other changes I want to do, mostly enhanced for loopsModified:ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ GlEvents.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ invoice/InvoiceServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ payment/BillingAccountWorker.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/ payment/PaymentMethodServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ period/PeriodServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/ TaxAuthorityServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ test/FinAccountTests.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ thirdparty/clearcommerce/CCServicesTest.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ thirdparty/gosoftware/PcChargeServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ thirdparty/gosoftware/RitaApi.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ thirdparty/gosoftware/RitaServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ thirdparty/valuelink/ValueLinkApi.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ thirdparty/valuelink/ValueLinkServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ util/UtilAccounting.javaModified: ofbiz/trunk/applications/accounting/src/org/ofbiz/ accounting/GlEvents.javaURL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/GlEvents.java?rev=882210&r1=882209&r2=882210&view=diff= = = = = = = = = ===================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ GlEvents.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ GlEvents.java Thu Nov 19 17:26:03 2009@@ -19,7 +19,6 @@ package org.ofbiz.accounting; import java.math.BigDecimal; -import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest;Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/ accounting/invoice/InvoiceServices.javaURL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java?rev=882210&r1=882209&r2=882210&view=diff= = = = = = = = = ===================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ invoice/InvoiceServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/ invoice/InvoiceServices.java Thu Nov 19 17:26:03 2009@@ -1158,7 +1158,7 @@ return serviceResult; }- public static Map<String, Object> createInvoicesFromShipments(DispatchContext dctx, Map context) { + public static Map<String, Object> createInvoicesFromShipments(DispatchContext dctx, Map<String, Object> context) {Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher();List<String> shipmentIds = UtilGenerics.checkList(context.get("shipmentIds"));Nope, this is wrong. Map<String, ? extends Object> context. THIS IS A BUG. PLEASE REVERT UNTIL IT IS FIXED. The service engine *owns* the incoming context map. Called services are not allowed to change it *at all*. There are already plenty of existing examples. When I did similiar things to framework, I discovered several services that modified the incoming context. I then had to change their code to deal with that problem. This patch needs to have the same thing done to it.
Hi Adam,Could you explain a bit more? When I look at the StandardJavaEngine class the serviceInvoker method is specifically passing a Map<String, Object> for the context.
Thanks Scott
smime.p7s
Description: S/MIME cryptographic signature
