{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5905","repository_url":"https://api.github.com/repos/orientechnologies/orientdb","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5905/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5905/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5905/events","html_url":"https://github.com/orientechnologies/orientdb/issues/5905","id":144467231,"number":5905,"title":"NPE in ORecordSerializerBinaryV0","user":{"login":"PhantomYdn","id":1199285,"avatar_url":"https://avatars.githubusercontent.com/u/1199285?v=3","gravatar_id":"","url":"https://api.github.com/users/PhantomYdn","html_url":"https://github.com/PhantomYdn","followers_url":"https://api.github.com/users/PhantomYdn/followers","following_url":"https://api.github.com/users/PhantomYdn/following{/other_user}","gists_url":"https://api.github.com/users/PhantomYdn/gists{/gist_id}","starred_url":"https://api.github.com/users/PhantomYdn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhantomYdn/subscriptions","organizations_url":"https://api.github.com/users/PhantomYdn/orgs","repos_url":"https://api.github.com/users/PhantomYdn/repos","events_url":"https://api.github.com/users/PhantomYdn/events{/privacy}","received_events_url":"https://api.github.com/users/PhantomYdn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"tglman","id":424369,"avatar_url":"https://avatars.githubusercontent.com/u/424369?v=3","gravatar_id":"","url":"https://api.github.com/users/tglman","html_url":"https://github.com/tglman","followers_url":"https://api.github.com/users/tglman/followers","following_url":"https://api.github.com/users/tglman/following{/other_user}","gists_url":"https://api.github.com/users/tglman/gists{/gist_id}","starred_url":"https://api.github.com/users/tglman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tglman/subscriptions","organizations_url":"https://api.github.com/users/tglman/orgs","repos_url":"https://api.github.com/users/tglman/repos","events_url":"https://api.github.com/users/tglman/events{/privacy}","received_events_url":"https://api.github.com/users/tglman/received_events","type":"User","site_admin":false},"assignees":[{"login":"tglman","id":424369,"avatar_url":"https://avatars.githubusercontent.com/u/424369?v=3","gravatar_id":"","url":"https://api.github.com/users/tglman","html_url":"https://github.com/tglman","followers_url":"https://api.github.com/users/tglman/followers","following_url":"https://api.github.com/users/tglman/following{/other_user}","gists_url":"https://api.github.com/users/tglman/gists{/gist_id}","starred_url":"https://api.github.com/users/tglman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tglman/subscriptions","organizations_url":"https://api.github.com/users/tglman/orgs","repos_url":"https://api.github.com/users/tglman/repos","events_url":"https://api.github.com/users/tglman/events{/privacy}","received_events_url":"https://api.github.com/users/tglman/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/88","html_url":"https://github.com/orientechnologies/orientdb/milestone/88","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/88/labels","id":1768027,"number":88,"title":"2.2.x (next hotfix)","description":"","creator":{"login":"robfrank","id":413587,"avatar_url":"https://avatars.githubusercontent.com/u/413587?v=3","gravatar_id":"","url":"https://api.github.com/users/robfrank","html_url":"https://github.com/robfrank","followers_url":"https://api.github.com/users/robfrank/followers","following_url":"https://api.github.com/users/robfrank/following{/other_user}","gists_url":"https://api.github.com/users/robfrank/gists{/gist_id}","starred_url":"https://api.github.com/users/robfrank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robfrank/subscriptions","organizations_url":"https://api.github.com/users/robfrank/orgs","repos_url":"https://api.github.com/users/robfrank/repos","events_url":"https://api.github.com/users/robfrank/events{/privacy}","received_events_url":"https://api.github.com/users/robfrank/received_events","type":"User","site_admin":false},"open_issues":162,"closed_issues":8,"state":"open","created_at":"2016-05-16T08:28:14Z","updated_at":"2016-12-27T15:31:25Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2016-03-30T05:24:44Z","updated_at":"2016-12-27T15:31:25Z","closed_at":"2016-12-27T15:31:25Z","body":"There is the following code in ORecordSerializerBinaryV0\n\n``` @SuppressWarnings(\"unchecked\")\n  private int writeEmbeddedMap(BytesContainer bytes, Map<Object, Object> map) {\n    final int[] pos = new int[map.size()];\n    int i = 0;\n    Entry<Object, Object> values[] = new Entry[map.size()];\n    final int fullPos = OVarIntSerializer.write(bytes, map.size());\n    for (Entry<Object, Object> entry : map.entrySet()) {\n      // TODO:check skip of complex types\n      // FIXME: changed to support only string key on map\n      OType type = OType.STRING;\n      writeOType(bytes, bytes.alloc(1), type);\n      writeString(bytes, entry.getKey().toString());\n      pos[i] = bytes.alloc(OIntegerSerializer.INT_SIZE + 1);\n      values[i] = entry;\n      i++;\n    }\n```\n\nThe problem is that some Maps can contains nulls as keys. So there will be NPE here: `entry.getKey().toString()`. \n"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/269340720","html_url":"https://github.com/orientechnologies/orientdb/issues/5905#issuecomment-269340720","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5905","id":269340720,"user":{"login":"tglman","id":424369,"avatar_url":"https://avatars.githubusercontent.com/u/424369?v=3","gravatar_id":"","url":"https://api.github.com/users/tglman","html_url":"https://github.com/tglman","followers_url":"https://api.github.com/users/tglman/followers","following_url":"https://api.github.com/users/tglman/following{/other_user}","gists_url":"https://api.github.com/users/tglman/gists{/gist_id}","starred_url":"https://api.github.com/users/tglman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tglman/subscriptions","organizations_url":"https://api.github.com/users/tglman/orgs","repos_url":"https://api.github.com/users/tglman/repos","events_url":"https://api.github.com/users/tglman/events{/privacy}","received_events_url":"https://api.github.com/users/tglman/received_events","type":"User","site_admin":false},"created_at":"2016-12-27T15:31:25Z","updated_at":"2016-12-27T15:31:25Z","body":"hi @PhantomYdn,\r\n\r\ndouble checking the fix i did the exception go up in any case of set of a null value on a tracked map, this for me is more than enough.\r\n\r\nClosing"}}
{"actor":{"display_login":"tglman"}}