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));
}
}
|