From 2d68d4cefd6a2f38d51b4856fab8d7b3bd2fb774 Mon Sep 17 00:00:00 2001 From: Sarath Subramanian <ssubramanian@hortonworks.com> Date: Fri, 17 Mar 2017 17:53:14 -0700 Subject: [PATCH] ATLAS-1470: fixed validation of byte-type tag attributes, to handle exception Signed-off-by: Madhan Neethiraj <madhan@apache.org> --- intg/src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 + } } } } -- libgit2 0.27.1