From f86acd4892cedc91477e6b95f6508a6706e89676 Mon Sep 17 00:00:00 2001 From: Richard Cordovano <rcordovano@basistech.com> Date: Thu, 2 Apr 2020 20:53:06 -0400 Subject: [PATCH] 6217 Refactor geo json attr utils --- .../blackboardutils/attributes/BlackboardJsonAttrUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/java/src/org/sleuthkit/datamodel/blackboardutils/attributes/BlackboardJsonAttrUtil.java b/bindings/java/src/org/sleuthkit/datamodel/blackboardutils/attributes/BlackboardJsonAttrUtil.java index 812f02c13..13a488875 100755 --- a/bindings/java/src/org/sleuthkit/datamodel/blackboardutils/attributes/BlackboardJsonAttrUtil.java +++ b/bindings/java/src/org/sleuthkit/datamodel/blackboardutils/attributes/BlackboardJsonAttrUtil.java @@ -33,7 +33,7 @@ public final class BlackboardJsonAttrUtil { * object of type T serialized to JSON. * * @param <T> The type of the attribute value object to be - * serailized. + * serialized. * @param attrType The type of attribute to create. * @param moduleName The name of the module creating the attribute. * @param attrValue The attribute value object. @@ -54,7 +54,7 @@ public static <T> BlackboardAttribute toAttribute(BlackboardAttribute.Type attrT * * @param <T> The type of the object to be created from the JSON. * @param attr The attribute. - * @param clazz the class object for class T. + * @param clazz The class object for class T. * * @return The T object from the attribute. * @@ -74,7 +74,7 @@ public static <T> T fromAttribute(BlackboardAttribute attr, Class<T> clazz) thro try { return (new Gson()).fromJson(json, clazz); } catch (JsonSyntaxException ex) { - throw new InvalidJsonException("The string value (JSON) of the attribute is of an unexpected type", ex); + throw new InvalidJsonException(String.format("The string value (JSON) could not be deserialized as a %s", clazz.getName()), ex); } } -- GitLab