{"action":"created","comment":{"url":"https://api.github.com/repos/apache/apex-malhar/pulls/comments/71554968","id":71554968,"diff_hunk":"@@ -45,58 +38,30 @@\n @org.apache.hadoop.classification.InterfaceStability.Evolving\n public class JsonFormatter extends Formatter<String>\n {\n+  private transient ObjectMapper objMapper;\n   private transient ObjectWriter writer;\n-  protected String dateFormat;\n \n+  @SuppressWarnings(\"deprecation\")\n   @Override\n   public void setup(OperatorContext context)\n   {\n-    try {\n-      ObjectMapper mapper = new ObjectMapper();\n-      if (dateFormat != null) {\n-        mapper.setDateFormat(new SimpleDateFormat(dateFormat));\n-      }\n-      writer = mapper.writerWithType(clazz);\n-      mapper.configure(SerializationConfig.Feature.AUTO_DETECT_FIELDS, true);\n-      mapper.configure(SerializationConfig.Feature.AUTO_DETECT_GETTERS, true);\n-      mapper.configure(SerializationConfig.Feature.AUTO_DETECT_IS_GETTERS, true);\n-    } catch (Throwable e) {\n-      throw new RuntimeException(\"Unable find provided class\");\n-    }\n+    objMapper = new ObjectMapper();\n+    writer = objMapper.writerWithType(clazz);\n   }\n \n   @Override\n   public String convert(Object tuple)\n   {\n+    if (tuple == null) {\n+      return null;\n+    }\n     try {\n       return writer.writeValueAsString(tuple);\n-    } catch (JsonGenerationException | JsonMappingException e) {\n-      logger.debug(\"Error while converting tuple {} {}\",tuple,e.getMessage());\n-    } catch (IOException e) {\n-      DTThrowable.rethrow(e);\n+    } catch (JsonProcessingException e) {\n+      logger.error(\"Error while converting tuple {} {}\", tuple, e.getMessage());\n     }","path":"library/src/main/java/com/datatorrent/lib/formatter/JsonFormatter.java","position":71,"original_position":71,"commit_id":"fa5aec6d223a07f2662112bb0eb284ebd2059ded","original_commit_id":"fa5aec6d223a07f2662112bb0eb284ebd2059ded","user":{"login":"devtagare","id":7666415,"avatar_url":"https://avatars.githubusercontent.com/u/7666415?v=3","gravatar_id":"","url":"https://api.github.com/users/devtagare","html_url":"https://github.com/devtagare","followers_url":"https://api.github.com/users/devtagare/followers","following_url":"https://api.github.com/users/devtagare/following{/other_user}","gists_url":"https://api.github.com/users/devtagare/gists{/gist_id}","starred_url":"https://api.github.com/users/devtagare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devtagare/subscriptions","organizations_url":"https://api.github.com/users/devtagare/orgs","repos_url":"https://api.github.com/users/devtagare/repos","events_url":"https://api.github.com/users/devtagare/events{/privacy}","received_events_url":"https://api.github.com/users/devtagare/received_events","type":"User","site_admin":false},"body":"Same as above e instead of e.getMessage()","created_at":"2016-07-20T16:05:25Z","updated_at":"2016-07-20T16:05:25Z","html_url":"https://github.com/apache/apex-malhar/pull/348#discussion_r71554968","pull_request_url":"https://api.github.com/repos/apache/apex-malhar/pulls/348","_links":{"self":{"href":"https://api.github.com/repos/apache/apex-malhar/pulls/comments/71554968"},"html":{"href":"https://github.com/apache/apex-malhar/pull/348#discussion_r71554968"},"pull_request":{"href":"https://api.github.com/repos/apache/apex-malhar/pulls/348"}}},"pull_request":{"url":"https://api.github.com/repos/apache/apex-malhar/pulls/348","id":78120302,"html_url":"https://github.com/apache/apex-malhar/pull/348","diff_url":"https://github.com/apache/apex-malhar/pull/348.diff","patch_url":"https://github.com/apache/apex-malhar/pull/348.patch","issue_url":"https://api.github.com/repos/apache/apex-malhar/issues/348","number":348,"state":"open","locked":false,"title":"APEXMALHAR-2157 Json formatter improvements","user":{"login":"shubham-pathak22","id":3529753,"avatar_url":"https://avatars.githubusercontent.com/u/3529753?v=3","gravatar_id":"","url":"https://api.github.com/users/shubham-pathak22","html_url":"https://github.com/shubham-pathak22","followers_url":"https://api.github.com/users/shubham-pathak22/followers","following_url":"https://api.github.com/users/shubham-pathak22/following{/other_user}","gists_url":"https://api.github.com/users/shubham-pathak22/gists{/gist_id}","starred_url":"https://api.github.com/users/shubham-pathak22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shubham-pathak22/subscriptions","organizations_url":"https://api.github.com/users/shubham-pathak22/orgs","repos_url":"https://api.github.com/users/shubham-pathak22/repos","events_url":"https://api.github.com/users/shubham-pathak22/events{/privacy}","received_events_url":"https://api.github.com/users/shubham-pathak22/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-20T10:05:24Z","updated_at":"2016-07-20T16:05:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c0a4841fe188dc53f23dd294cce356083ee1354","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/apex-malhar/pulls/348/commits","review_comments_url":"https://api.github.com/repos/apache/apex-malhar/pulls/348/comments","review_comment_url":"https://api.github.com/repos/apache/apex-malhar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/apex-malhar/issues/348/comments","statuses_url":"https://api.github.com/repos/apache/apex-malhar/statuses/fa5aec6d223a07f2662112bb0eb284ebd2059ded","head":{"label":"shubham-pathak22:APEXMALHAR-2157","ref":"APEXMALHAR-2157","sha":"fa5aec6d223a07f2662112bb0eb284ebd2059ded","user":{"login":"shubham-pathak22","id":3529753,"avatar_url":"https://avatars.githubusercontent.com/u/3529753?v=3","gravatar_id":"","url":"https://api.github.com/users/shubham-pathak22","html_url":"https://github.com/shubham-pathak22","followers_url":"https://api.github.com/users/shubham-pathak22/followers","following_url":"https://api.github.com/users/shubham-pathak22/following{/other_user}","gists_url":"https://api.github.com/users/shubham-pathak22/gists{/gist_id}","starred_url":"https://api.github.com/users/shubham-pathak22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shubham-pathak22/subscriptions","organizations_url":"https://api.github.com/users/shubham-pathak22/orgs","repos_url":"https://api.github.com/users/shubham-pathak22/repos","events_url":"https://api.github.com/users/shubham-pathak22/events{/privacy}","received_events_url":"https://api.github.com/users/shubham-pathak22/received_events","type":"User","site_admin":false},"repo":{"id":42044083,"name":"incubator-apex-malhar","full_name":"shubham-pathak22/incubator-apex-malhar","owner":{"login":"shubham-pathak22","id":3529753,"avatar_url":"https://avatars.githubusercontent.com/u/3529753?v=3","gravatar_id":"","url":"https://api.github.com/users/shubham-pathak22","html_url":"https://github.com/shubham-pathak22","followers_url":"https://api.github.com/users/shubham-pathak22/followers","following_url":"https://api.github.com/users/shubham-pathak22/following{/other_user}","gists_url":"https://api.github.com/users/shubham-pathak22/gists{/gist_id}","starred_url":"https://api.github.com/users/shubham-pathak22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shubham-pathak22/subscriptions","organizations_url":"https://api.github.com/users/shubham-pathak22/orgs","repos_url":"https://api.github.com/users/shubham-pathak22/repos","events_url":"https://api.github.com/users/shubham-pathak22/events{/privacy}","received_events_url":"https://api.github.com/users/shubham-pathak22/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shubham-pathak22/incubator-apex-malhar","description":"Mirror of Apache Apex malhar (Incubating)","fork":true,"url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar","forks_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/forks","keys_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/teams","hooks_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/hooks","issue_events_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/issues/events{/number}","events_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/events","assignees_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/assignees{/user}","branches_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/branches{/branch}","tags_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/tags","blobs_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/git/refs{/sha}","trees_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/statuses/{sha}","languages_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/languages","stargazers_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/stargazers","contributors_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/contributors","subscribers_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/subscribers","subscription_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/subscription","commits_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/commits{/sha}","git_commits_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/git/commits{/sha}","comments_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/comments{/number}","issue_comment_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/issues/comments{/number}","contents_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/contents/{+path}","compare_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/merges","archive_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/downloads","issues_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/issues{/number}","pulls_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/pulls{/number}","milestones_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/milestones{/number}","notifications_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/labels{/name}","releases_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/releases{/id}","deployments_url":"https://api.github.com/repos/shubham-pathak22/incubator-apex-malhar/deployments","created_at":"2015-09-07T09:31:00Z","updated_at":"2015-09-07T09:31:04Z","pushed_at":"2016-07-20T10:41:53Z","git_url":"git://github.com/shubham-pathak22/incubator-apex-malhar.git","ssh_url":"git@github.com:shubham-pathak22/incubator-apex-malhar.git","clone_url":"https://github.com/shubham-pathak22/incubator-apex-malhar.git","svn_url":"https://github.com/shubham-pathak22/incubator-apex-malhar","homepage":null,"size":86230,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"aaa4464f0bb03db4aca5f6efd9658c0a791d0b42","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":41348334,"name":"apex-malhar","full_name":"apache/apex-malhar","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/apex-malhar","description":"Mirror of Apache Apex malhar","fork":false,"url":"https://api.github.com/repos/apache/apex-malhar","forks_url":"https://api.github.com/repos/apache/apex-malhar/forks","keys_url":"https://api.github.com/repos/apache/apex-malhar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/apex-malhar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/apex-malhar/teams","hooks_url":"https://api.github.com/repos/apache/apex-malhar/hooks","issue_events_url":"https://api.github.com/repos/apache/apex-malhar/issues/events{/number}","events_url":"https://api.github.com/repos/apache/apex-malhar/events","assignees_url":"https://api.github.com/repos/apache/apex-malhar/assignees{/user}","branches_url":"https://api.github.com/repos/apache/apex-malhar/branches{/branch}","tags_url":"https://api.github.com/repos/apache/apex-malhar/tags","blobs_url":"https://api.github.com/repos/apache/apex-malhar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/apex-malhar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/apex-malhar/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/apex-malhar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/apex-malhar/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/apex-malhar/languages","stargazers_url":"https://api.github.com/repos/apache/apex-malhar/stargazers","contributors_url":"https://api.github.com/repos/apache/apex-malhar/contributors","subscribers_url":"https://api.github.com/repos/apache/apex-malhar/subscribers","subscription_url":"https://api.github.com/repos/apache/apex-malhar/subscription","commits_url":"https://api.github.com/repos/apache/apex-malhar/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/apex-malhar/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/apex-malhar/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/apex-malhar/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/apex-malhar/contents/{+path}","compare_url":"https://api.github.com/repos/apache/apex-malhar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/apex-malhar/merges","archive_url":"https://api.github.com/repos/apache/apex-malhar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/apex-malhar/downloads","issues_url":"https://api.github.com/repos/apache/apex-malhar/issues{/number}","pulls_url":"https://api.github.com/repos/apache/apex-malhar/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/apex-malhar/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/apex-malhar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/apex-malhar/labels{/name}","releases_url":"https://api.github.com/repos/apache/apex-malhar/releases{/id}","deployments_url":"https://api.github.com/repos/apache/apex-malhar/deployments","created_at":"2015-08-25T07:00:05Z","updated_at":"2016-07-17T13:08:16Z","pushed_at":"2016-07-20T10:41:54Z","git_url":"git://github.com/apache/apex-malhar.git","ssh_url":"git@github.com:apache/apex-malhar.git","clone_url":"https://github.com/apache/apex-malhar.git","svn_url":"https://github.com/apache/apex-malhar","homepage":"","size":96993,"stargazers_count":46,"watchers_count":46,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":91,"mirror_url":"git://git.apache.org/incubator-apex-malhar.git","open_issues_count":25,"forks":91,"open_issues":25,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/apex-malhar/pulls/348"},"html":{"href":"https://github.com/apache/apex-malhar/pull/348"},"issue":{"href":"https://api.github.com/repos/apache/apex-malhar/issues/348"},"comments":{"href":"https://api.github.com/repos/apache/apex-malhar/issues/348/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/apex-malhar/pulls/348/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/apex-malhar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/apex-malhar/pulls/348/commits"},"statuses":{"href":"https://api.github.com/repos/apache/apex-malhar/statuses/fa5aec6d223a07f2662112bb0eb284ebd2059ded"}}}}
{"actor":{"display_login":"devtagare"}}