Repository: incubator-atlas
Updated Branches:
  refs/heads/0.8-incubating cc53df581 -> 89b4c133a


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

Signed-off-by: Madhan Neethiraj <[email protected]>
(cherry picked from commit 2d68d4cefd6a2f38d51b4856fab8d7b3bd2fb774)


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

Branch: refs/heads/0.8-incubating
Commit: 89b4c133a1d1a79a7113d416a38933416e5a75c0
Parents: cc53df5
Author: Sarath Subramanian <[email protected]>
Authored: Fri Mar 17 17:53:14 2017 -0700
Committer: Madhan Neethiraj <[email protected]>
Committed: Fri Mar 17 18:13:49 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/89b4c133/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
+                        }
                     }
                 }
             }

Reply via email to