details:   /erp/devel/pi/rev/50054fa153fe
changeset: 12244:50054fa153fe
user:      Iván Perdomo <ivan.perdomo <at> openbravo.com>
date:      Thu May 19 11:39:25 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, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r 5f7a1c15677a -r 50054fa153fe 
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:31:59 2011 +0200
+++ 
b/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
       Thu May 19 11:39:25 2011 +0200
@@ -530,6 +530,9 @@
     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("")) 
{
+        continue;
+      }
       final String clauseString = parseCriteria(clause);
       if (clauseString != null) {
         if (sb.length() > 0) {

------------------------------------------------------------------------------
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