You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2017/10/03 22:02:40 UTC

atlas git commit: ATLAS-2184: fixed isNull/notNull in-memory predicates to handle empty value

Repository: atlas
Updated Branches:
  refs/heads/master fe05e1575 -> dd7eb14e4


ATLAS-2184: fixed isNull/notNull in-memory predicates to handle empty value

Signed-off-by: Madhan Neethiraj <ma...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/dd7eb14e
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/dd7eb14e
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/dd7eb14e

Branch: refs/heads/master
Commit: dd7eb14e47ae999464a4ab07d4e62be6f634e5ae
Parents: fe05e15
Author: apoorvnaik <ap...@apache.org>
Authored: Tue Oct 3 14:40:13 2017 -0700
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Tue Oct 3 14:47:58 2017 -0700

----------------------------------------------------------------------
 .../apache/atlas/discovery/SearchProcessor.java   | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/dd7eb14e/repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java b/repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java
index ba0cd8a..019fd17 100644
--- a/repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java
+++ b/repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java
@@ -467,40 +467,40 @@ public abstract class SearchProcessor {
                     break;
                 case AtlasBaseTypeDef.ATLAS_TYPE_SHORT:
                     attrClass = Short.class;
-                    attrValue = attrVal == null ? null : Short.parseShort(attrVal);
+                    attrValue = StringUtils.isEmpty(attrVal) ? null : Short.parseShort(attrVal);
                     break;
                 case AtlasBaseTypeDef.ATLAS_TYPE_INT:
                     attrClass = Integer.class;
-                    attrValue = attrVal == null ? null : Integer.parseInt(attrVal);
+                    attrValue = StringUtils.isEmpty(attrVal) ? null : Integer.parseInt(attrVal);
                     break;
                 case AtlasBaseTypeDef.ATLAS_TYPE_BIGINTEGER:
                     attrClass = BigInteger.class;
-                    attrValue = attrVal == null ? null : new BigInteger(attrVal);
+                    attrValue = StringUtils.isEmpty(attrVal) ? null : new BigInteger(attrVal);
                     break;
                 case AtlasBaseTypeDef.ATLAS_TYPE_BOOLEAN:
                     attrClass = Boolean.class;
-                    attrValue = attrVal == null ? null : Boolean.parseBoolean(attrVal);
+                    attrValue = StringUtils.isEmpty(attrVal) ? null : Boolean.parseBoolean(attrVal);
                     break;
                 case AtlasBaseTypeDef.ATLAS_TYPE_BYTE:
                     attrClass = Byte.class;
-                    attrValue = attrVal == null ? null : Byte.parseByte(attrVal);
+                    attrValue = StringUtils.isEmpty(attrVal) ? null : Byte.parseByte(attrVal);
                     break;
                 case AtlasBaseTypeDef.ATLAS_TYPE_LONG:
                 case AtlasBaseTypeDef.ATLAS_TYPE_DATE:
                     attrClass = Long.class;
-                    attrValue = attrVal == null ? null : Long.parseLong(attrVal);
+                    attrValue = StringUtils.isEmpty(attrVal) ? null : Long.parseLong(attrVal);
                     break;
                 case AtlasBaseTypeDef.ATLAS_TYPE_FLOAT:
                     attrClass = Float.class;
-                    attrValue = attrVal == null ? null : Float.parseFloat(attrVal);
+                    attrValue = StringUtils.isEmpty(attrVal) ? null : Float.parseFloat(attrVal);
                     break;
                 case AtlasBaseTypeDef.ATLAS_TYPE_DOUBLE:
                     attrClass = Double.class;
-                    attrValue = attrVal == null ? null : Double.parseDouble(attrVal);
+                    attrValue = StringUtils.isEmpty(attrVal) ? null : Double.parseDouble(attrVal);
                     break;
                 case AtlasBaseTypeDef.ATLAS_TYPE_BIGDECIMAL:
                     attrClass = BigDecimal.class;
-                    attrValue = attrVal == null ? null : new BigDecimal(attrVal);
+                    attrValue = StringUtils.isEmpty(attrVal) ? null : new BigDecimal(attrVal);
                     break;
                 default:
                     if (attrType instanceof AtlasEnumType) {