details:   https://code.openbravo.com/erp/devel/pi/rev/3efd192fdaae
changeset: 20412:3efd192fdaae
user:      Shankar Balachandran <shankar.balachandran <at> openbravo.com>
date:      Tue May 21 17:58:31 2013 +0530
summary:   Related to Issue 23743 : Code Refactoring to replace ' WHERE ' to 
avoid replacing words like 'SOMEWHERE'

Replaced " WHERE " instead of "WHERE" so that words that has where in it like 
"SOMEWHERE" are not replaced incorrectly.

diffstat:

 src/org/openbravo/dal/service/OBQuery.java |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r d48fd49cb8fe -r 3efd192fdaae src/org/openbravo/dal/service/OBQuery.java
--- a/src/org/openbravo/dal/service/OBQuery.java        Tue May 21 17:37:29 
2013 +0530
+++ b/src/org/openbravo/dal/service/OBQuery.java        Tue May 21 17:58:31 
2013 +0530
@@ -499,7 +499,7 @@
    */
   public String getWhereAndOrderBy() {
     // replace WHERE keyword to lowercase as hql exception is generated in 
org.hibernate.hql.PARSER
-    whereAndOrderBy = whereAndOrderBy.replaceAll("WHERE", "where");
+    whereAndOrderBy = whereAndOrderBy.replaceAll(" WHERE ", " where ");
     return whereAndOrderBy;
   }
 

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to