details:   /erp/devel/pi/rev/e65378ace3a9
changeset: 12245:e65378ace3a9
user:      Iván Perdomo <ivan.perdomo <at> openbravo.com>
date:      Thu May 19 11:42:17 2011 +0200
summary:   Fixes issue 17253: Do not process parameter when value is empty 
string

diffstat:

 
modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
 |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 50054fa153fe -r e65378ace3a9 
modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
--- 
a/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
       Thu May 19 11:39:25 2011 +0200
+++ 
b/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
       Thu May 19 11:42:17 2011 +0200
@@ -530,7 +530,8 @@
     final StringBuilder sb = new StringBuilder();
     for (int i = 0; i < clauses.length(); i++) {
       final JSONObject clause = clauses.getJSONObject(i);
-      if (clause.get("value") != null && clause.getString("value").equals("")) 
{
+      if (clause.has("value") && clause.get("value") != null
+          && clause.getString("value").equals("")) {
         continue;
       }
       final String clauseString = parseCriteria(clause);

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to