I think we can keep those existing, it's mostly in patch that the problem arises

Adrian said he fixed the lines lenght at 300 in Eclipse. I have not set any length personnaly. Actually I'm not quite sure how to do this in Eclipse, I think I tried "Show Print Margin" but found it irrelevant anyway..

My 2cts

Jacques

[email protected] wrote:
I agree with you, which maximum value (100/300) long lines will would like to
use in OFBiz ?
There is a standard rules to be follow (I still have not checked into the
committer rules)

There was already some long lines splitted into the SagePayPaymentService.java
and how we could change ?

For example how we have to change this code:

Map<String, Object> paymentResult = dispatcher.runSync
("SagePayPaymentAuthentication",
                    UtilMisc.toMap(
                            "paymentGatewayConfigId", paymentGatewayConfigId,
                            "vendorTxCode", billingInfo.get("orderId"),
                            "cardHolder", billingInfo.get("cardHolder"),
                            "cardNumber", billingInfo.get("cardNumber"),
                            "expiryDate", billingInfo.get("expiryDate"),
                            "cardType", billingInfo.get("cardType"),
                            "cv2", billingInfo.get("cv2"),
                            "description", billingInfo.get("description"),
                            "amount", billingInfo.get("amount"),
                            "currency", billingInfo.get("currency"),
                            "billingAddress", billingInfo.get
("billingAddress"),
                            "billingPostCode", billingInfo.get
("billingPostCode")
                        )
                    );

Thanks
Marco

----Messaggio originale----
Da: [email protected]
Data: 18/01/2011 23.57
A: <[email protected]>
Ogg: Re: svn commit: r1060599 - in /ofbiz/trunk/applications/accounting:
config/AccountingUiLabels.xml
src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java

What Adam asked is especially to no cut existing long lines... This makes
sense because it's easier to read patches...

Thanks

Jacques

From: <[email protected]>
Ok, I will use long lines but a lot of sources having long lines splitted.
This is the standard formatting preference in use by Eclipse but not by OFBiz 
standards.

Thanks
Marco

Il giorno 18/gen/2011, alle ore 23.30, Jacques Le Roux ha scritto:

Marco,

Have you seen Adam's remark about long lines splitted. I guess you are
using a tool for format those lines. Anyway we prefer to
keep
them reasonnably long. At least I agree with Adam we should not uselessly 
change already long lines

Thanks

Jacques

Author: mrisaliti
Date: Tue Jan 18 22:20:48 2011
New Revision: 1060599

URL: http://svn.apache.org/viewvc?rev=1060599&view=rev
Log:
Internationalization of ServiceUtil.returnSuccess, ServiceUtil.
returnFailure, ServiceUtil.returnError (OFBIZ-4091)

Modified:
  ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml

ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.
java

Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels. xml
URL:
http://svn.apache.
org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?
rev=1060599&r1=1060598&r2=1060599&view=diff

==============================================================================
--- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original)
+++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Tue Jan 
18 22:20:48 2011
@@ -9470,6 +9470,10 @@
       <value xml:lang="en">Exception in calling
SagePayPaymentAuthorisation: ${errorString}</value>
       <value xml:lang="it">Eccezione durante la chiamata a
SagePayPaymentAuthorisation: ${errorString}</value>
   </property>
+    <property key="AccountingSagePayOrderPaymenPreferenceIsNull">
+        <value xml:lang="en">OrderPaymentPreference for order :
${orderId } is null: ${orderPaymentPreference}</value>
+        <value xml:lang="it">Preferenze pagamento per l'ordine :
${orderId } è nullo: ${orderPaymentPreference}</value>
+    </property>
   <property key="AccountingSagePayPaymentRefundException">
       <value xml:lang="en">Exception in calling SagePayPaymentRefund: 
${errorString}</value>
       <value xml:lang="it">Eccezione durante la chiamata a
SagePayPaymentRefund: ${errorString}</value>

Modified:
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.
java
URL:
http://svn.apache.
org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.
java?rev=1060599&r1=1060598&r2=1060599&view=diff

==============================================================================
---
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.
java (original)
+++
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.
java Tue Jan 18
22:20:48 2011
@@ -153,11 +153,14 @@ public class SagePayPaymentServices {
       Debug.logInfo("SagePay - Entered ccAuth", module);
       Debug.logInfo("SagePay ccAuth context : " + context, module);
       Map<String, Object> response = null;
+        String orderId = (String) context.get("orderId");
       Locale locale = (Locale) context.get("locale");
       GenericValue orderPaymentPreference = (GenericValue) context.get 
("orderPaymentPreference");
+
       if (orderPaymentPreference == null) {
           response = ServiceUtil.returnError(UtilProperties.getMessage 
(resource,
-                    "AccountingProblemGettingOrderPaymentPreferences", 
locale));
+                    "AccountingSagePayOrderPaymenPreferenceIsNull",
+                    UtilMisc.toMap("orderId", orderId,
"orderPaymentPreference", orderPaymentPreference), locale));
       } else {
           response = processCardAuthorisationPayment(dctx, context);
}


Reply via email to