Related with bug 25811: Use equals to compare Strings
authorAugusto Mauch <augusto.mauch@openbravo.com>
Fri, 21 Nov 2014 10:12:14 +0100
changeset 25300 86228b5743b3
parent 25299 6c40462ac6e5
child 25301 9f90ea7d41b0
Related with bug 25811: Use equals to compare Strings
modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
--- a/modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java	Wed Nov 19 16:35:42 2014 +0100
+++ b/modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java	Fri Nov 21 10:12:14 2014 +0100
@@ -410,7 +410,7 @@
 
     if (parameters.containsKey(JsonConstants.TARGETRECORDID_PARAMETER)
         && parameters.get(JsonConstants.TARGETRECORDID_PARAMETER) != null
-        && parameters.get(JsonConstants.TARGETRECORDID_PARAMETER) != "null"
+        && !"null".equals(parameters.get(JsonConstants.TARGETRECORDID_PARAMETER))
         && !"true".equals(parameters.get("_directNavigation"))) {
       log.warn("Datasource request with targetRecordId but without directNavigation detected. This type of requests should be avoided because they result in a query that performs poorly. Parameters: "
           + convertParameterToString(parameters));