related to issue 32231: check if values are null
authorCarlos Aristu <carlos.aristu@openbravo.com>
Fri, 19 Feb 2016 13:09:01 +0100
changeset 28624 f58e58d7e308
parent 28623 ca36991325a4
child 28625 e408f8f90401
related to issue 32231: check if values are null
modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DefaultDataSourceService.java
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DefaultDataSourceService.java	Mon Feb 15 19:53:12 2016 +0100
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DefaultDataSourceService.java	Fri Feb 19 13:09:01 2016 +0100
@@ -292,6 +292,12 @@
 
   private static boolean isSameNumericValue(String str1, String str2) {
     try {
+      if (str1 == null && str2 == null) {
+        return true;
+      }
+      if (str1 == null && str2 != null || str1 != null && str2 == null) {
+        return false;
+      }
       BigDecimal bd1 = new BigDecimal(str1);
       BigDecimal bd2 = new BigDecimal(str2);
       return bd1.doubleValue() == bd2.doubleValue();