Fixed a possible Json deserialize bug caused by illegal Text use
Project: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/commit/880ee8a2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/tree/880ee8a2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/diff/880ee8a2 Branch: refs/heads/master Commit: 880ee8a2a31b052323a19619ff437060536c4b7c Parents: d13ac41 Author: Makoto Yui <[email protected]> Authored: Tue Nov 6 19:42:28 2018 +0900 Committer: Makoto Yui <[email protected]> Committed: Tue Nov 6 19:42:28 2018 +0900 ---------------------------------------------------------------------- core/src/main/java/hivemall/utils/hadoop/JsonSerdeUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/880ee8a2/core/src/main/java/hivemall/utils/hadoop/JsonSerdeUtils.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/hivemall/utils/hadoop/JsonSerdeUtils.java b/core/src/main/java/hivemall/utils/hadoop/JsonSerdeUtils.java index 1315537..562e9a4 100644 --- a/core/src/main/java/hivemall/utils/hadoop/JsonSerdeUtils.java +++ b/core/src/main/java/hivemall/utils/hadoop/JsonSerdeUtils.java @@ -380,7 +380,7 @@ public final class JsonSerdeUtils { final Object result; try { JsonParser p = - new JsonFactory().createJsonParser(new FastByteArrayInputStream(t.getBytes())); + new JsonFactory().createJsonParser(new FastByteArrayInputStream(t.getBytes(), t.getLength())); final JsonToken token = p.nextToken(); if (token == JsonToken.START_OBJECT) { result = parseObject(p, columnNames, columnTypes);
