details: https://code.openbravo.com/erp/devel/pi/rev/99602b3c2a17
changeset: 16877:99602b3c2a17
user: Augusto Mauch <augusto.mauch <at> openbravo.com>
date: Wed Jun 20 17:03:55 2012 +0200
summary: Fixes issue 20819. Related to issue 20684. NPE prevented.
A NullPointerException has been prevented by replacing columnValue.isEmpty()
with StringUtils.isEmpty(columnValue), which returns true if columnValue is
null, instead of throwing a NullPointerException.
diffstat:
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/TimeUIDefinition.java
| 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r aa0d7faac4a8 -r 99602b3c2a17
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/TimeUIDefinition.java
---
a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/TimeUIDefinition.java
Tue Jun 19 16:33:08 2012 +0200
+++
b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/TimeUIDefinition.java
Wed Jun 20 17:03:55 2012 +0200
@@ -24,6 +24,7 @@
import java.util.Calendar;
import java.util.Date;
+import org.apache.commons.lang.StringUtils;
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
import org.openbravo.base.exception.OBException;
@@ -86,7 +87,7 @@
RequestContext rq = RequestContext.get();
String columnValue = rq.getRequestParameter("inp"
+
Sqlc.TransformaNombreColumna(field.getColumn().getDBColumnName()));
- if (columnValue.isEmpty()) {
+ if (StringUtils.isEmpty(columnValue)) {
// If the date is empty, it does not have to be converted
return result;
}
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits