Author: jleroux
Date: Wed Oct 28 09:22:29 2009
New Revision: 830477
URL:
http://svn.apache.org/viewvc?rev=830477&view=revLog:
Secure r830458 (avoid NPE)
Modified:
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java
Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java?rev=830477&r1=830476&r2=830477&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ClientProfile.java Wed Oct 28 09:22:29 2009
@@ -310,7 +310,7 @@
String email = clientInfos.length > 1 ? clientInfos[1] : "";
String phone = clientInfos.length > 2 ? clientInfos[2] : "";
String card = clientInfos.length > 3 ? clientInfos[3] : "";
- if (SWIP_WITH_CARD && card.startsWith(START_SENTINEL) && card.endsWith(END_SENTINEL)) {
+ if (UtilValidate.isNotEmpty(card) && SWIP_WITH_CARD && card.startsWith(START_SENTINEL) && card.endsWith(END_SENTINEL)) {
card = card.substring(1, card.length() - 1);
}
m_nameEdit.setText(name);