You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hivemall.apache.org by my...@apache.org on 2018/11/06 10:42:38 UTC

[2/2] incubator-hivemall git commit: Fixed a possible Json deserialize bug caused by illegal Text use

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 <my...@apache.org>
Authored: Tue Nov 6 19:42:28 2018 +0900
Committer: Makoto Yui <my...@apache.org>
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);