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/03/18 01:13:30 UTC

incubator-atlas git commit: ATLAS-1470: fixed validation of byte-type tag attributes, to handle exception

Repository: incubator-atlas
Updated Branches:
  refs/heads/master f379c9ffd -> 2d68d4cef


ATLAS-1470: fixed validation of byte-type tag attributes, to handle exception

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


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

Branch: refs/heads/master
Commit: 2d68d4cefd6a2f38d51b4856fab8d7b3bd2fb774
Parents: f379c9f
Author: Sarath Subramanian <ss...@hortonworks.com>
Authored: Fri Mar 17 17:53:14 2017 -0700
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Fri Mar 17 17:58:40 2017 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/2d68d4ce/intg/src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java b/intg/src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java
index 2c80aa3..f08a601 100644
--- a/intg/src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java
+++ b/intg/src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java
@@ -105,7 +105,11 @@ public class AtlasBuiltInTypes {
                     String strValue = obj.toString();
 
                     if (StringUtils.isNotEmpty(strValue)) {
-                        return Byte.valueOf(strValue);
+                        try {
+                            return Byte.valueOf(strValue);
+                        } catch(NumberFormatException excp) {
+                            // ignore
+                        }
                     }
                 }
             }