details:   https://code.openbravo.com/erp/devel/pi/rev/404df897b70f
changeset: 34466:404df897b70f
user:      Carlos Aristu <carlos.aristu <at> openbravo.com>
date:      Wed Jul 25 11:30:21 2018 +0200
summary:   related to issue 37064: add null check

  Added null check because after the Hibernate upgrade, the getReturnAliases() 
method returns null for those columns in the select which does not have an alias

diffstat:

 
modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/CustomQuerySelectorDatasource.java
 |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 7ce4beaa1c5f -r 404df897b70f 
modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/CustomQuerySelectorDatasource.java
--- 
a/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/CustomQuerySelectorDatasource.java
  Wed Jul 25 10:10:21 2018 +0200
+++ 
b/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/CustomQuerySelectorDatasource.java
  Wed Jul 25 11:30:21 2018 +0200
@@ -531,7 +531,7 @@
         .createQuery(sel.getHQL().replace(ADDITIONAL_FILTERS, 
"1=1")).getReturnAliases();
 
     for (int i = 0; i < queryAliases.length; i++) {
-      if (queryAliases[i].equals(fieldName)) {
+      if (queryAliases[i] != null && queryAliases[i].equals(fieldName)) {
         return i + 1;
       }
     }

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to