svn commit: r897280 - /ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r897280 - /ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java

mrisaliti
Author: mrisaliti
Date: Fri Jan  8 18:07:19 2010
New Revision: 897280

URL: http://svn.apache.org/viewvc?rev=897280&view=rev
Log:
Avoid a NullPointerException

Modified:
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java

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=897280&r1=897279&r2=897280&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 Jan  8 18:07:19 2010
@@ -2835,7 +2835,7 @@
         GenericValue pgr = (GenericValue) context.get("paymentGatewayResponse");
         if ("PaymentGatewayResponse".equals(pgr.getEntityName())) {
             String message = pgr.getString("gatewayMessage");
-            if (message.length() > 255) {
+            if (UtilValidate.isNotEmpty(message) && message.length() > 255) {
                 pgr.set("gatewayMessage", message.substring(0, 255));
             }
         }