{"action":"created","comment":{"url":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/comments/28503569","id":28503569,"diff_hunk":"@@ -729,16 +729,16 @@ public static String serializeEnum(Object value) {\n         }\n       }\n       return null;\n-    } else if (cls.isAssignableFrom(Double.class)) {\n+    } else if (Double.class.isAssignableFrom(cls)) {\n       return (T) ((Double) Double.parseDouble(value));\n-    } else if (cls.isAssignableFrom(Number.class))  {\n+    } else if (Number.class.isAssignableFrom(cls))  {\n       return (T) ((Integer) Integer.parseInt(value));","path":"src/main/java/microsoft/exchange/webservices/data/core/EwsUtilities.java","position":9,"original_position":9,"commit_id":"34f70a538a9c2af9693d45f793c2da52230871c6","original_commit_id":"34f70a538a9c2af9693d45f793c2da52230871c6","user":{"login":"serious6","id":3902037,"avatar_url":"https://avatars.githubusercontent.com/u/3902037?v=3","gravatar_id":"","url":"https://api.github.com/users/serious6","html_url":"https://github.com/serious6","followers_url":"https://api.github.com/users/serious6/followers","following_url":"https://api.github.com/users/serious6/following{/other_user}","gists_url":"https://api.github.com/users/serious6/gists{/gist_id}","starred_url":"https://api.github.com/users/serious6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serious6/subscriptions","organizations_url":"https://api.github.com/users/serious6/orgs","repos_url":"https://api.github.com/users/serious6/repos","events_url":"https://api.github.com/users/serious6/events{/privacy}","received_events_url":"https://api.github.com/users/serious6/received_events","type":"User","site_admin":false},"body":"casting `Number` to `Integer` will fail the following tests:\r\n```java\r\n  @Test\r\n  public void testParseBigInt() throws IllegalAccessException, ParseException, InstantiationException {\r\n    Assert.assertEquals(BigInteger.TEN, EwsUtilities.parse(BigInteger.class, BigInteger.TEN.toString()));\r\n  }\r\n\r\n  @Test\r\n  public void testParseBigDec() throws IllegalAccessException, ParseException, InstantiationException {\r\n    Assert.assertEquals(BigDecimal.TEN, EwsUtilities.parse(BigDecimal.class, BigDecimal.TEN.toString()));\r\n  }\r\n```\r\nmaybe there should be a more general implementation here.","created_at":"2015-04-16T12:04:56Z","updated_at":"2015-04-16T12:04:56Z","html_url":"https://github.com/OfficeDev/ews-java-api/pull/293#discussion_r28503569","pull_request_url":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/293","_links":{"self":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/comments/28503569"},"html":{"href":"https://github.com/OfficeDev/ews-java-api/pull/293#discussion_r28503569"},"pull_request":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/293"}}},"pull_request":{"url":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/293","id":33442283,"html_url":"https://github.com/OfficeDev/ews-java-api/pull/293","diff_url":"https://github.com/OfficeDev/ews-java-api/pull/293.diff","patch_url":"https://github.com/OfficeDev/ews-java-api/pull/293.patch","issue_url":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/293","number":293,"state":"open","locked":false,"title":"Fix parse problem in EwsUtilities","user":{"login":"tomravn","id":10994693,"avatar_url":"https://avatars.githubusercontent.com/u/10994693?v=3","gravatar_id":"","url":"https://api.github.com/users/tomravn","html_url":"https://github.com/tomravn","followers_url":"https://api.github.com/users/tomravn/followers","following_url":"https://api.github.com/users/tomravn/following{/other_user}","gists_url":"https://api.github.com/users/tomravn/gists{/gist_id}","starred_url":"https://api.github.com/users/tomravn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomravn/subscriptions","organizations_url":"https://api.github.com/users/tomravn/orgs","repos_url":"https://api.github.com/users/tomravn/repos","events_url":"https://api.github.com/users/tomravn/events{/privacy}","received_events_url":"https://api.github.com/users/tomravn/received_events","type":"User","site_admin":false},"body":"This is a fix for parsing Strings into different types. The isAssignableFrom() usages had the classes the wrong way round. This is fine when the classes are the same, but not for eg Number and Integer. This error caused the ExchangeServerInfo parsing from a SOAP header to fail.","created_at":"2015-04-16T11:41:21Z","updated_at":"2015-04-16T12:04:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"880cecfbd873fe5814f7e215b90dcb92305eb777","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/293/commits","review_comments_url":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/293/comments","review_comment_url":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/293/comments","statuses_url":"https://api.github.com/repos/OfficeDev/ews-java-api/statuses/34f70a538a9c2af9693d45f793c2da52230871c6","head":{"label":"RavnSystems:master","ref":"master","sha":"34f70a538a9c2af9693d45f793c2da52230871c6","user":{"login":"RavnSystems","id":4903645,"avatar_url":"https://avatars.githubusercontent.com/u/4903645?v=3","gravatar_id":"","url":"https://api.github.com/users/RavnSystems","html_url":"https://github.com/RavnSystems","followers_url":"https://api.github.com/users/RavnSystems/followers","following_url":"https://api.github.com/users/RavnSystems/following{/other_user}","gists_url":"https://api.github.com/users/RavnSystems/gists{/gist_id}","starred_url":"https://api.github.com/users/RavnSystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RavnSystems/subscriptions","organizations_url":"https://api.github.com/users/RavnSystems/orgs","repos_url":"https://api.github.com/users/RavnSystems/repos","events_url":"https://api.github.com/users/RavnSystems/events{/privacy}","received_events_url":"https://api.github.com/users/RavnSystems/received_events","type":"Organization","site_admin":false},"repo":{"id":34052031,"name":"ews-java-api","full_name":"RavnSystems/ews-java-api","owner":{"login":"RavnSystems","id":4903645,"avatar_url":"https://avatars.githubusercontent.com/u/4903645?v=3","gravatar_id":"","url":"https://api.github.com/users/RavnSystems","html_url":"https://github.com/RavnSystems","followers_url":"https://api.github.com/users/RavnSystems/followers","following_url":"https://api.github.com/users/RavnSystems/following{/other_user}","gists_url":"https://api.github.com/users/RavnSystems/gists{/gist_id}","starred_url":"https://api.github.com/users/RavnSystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RavnSystems/subscriptions","organizations_url":"https://api.github.com/users/RavnSystems/orgs","repos_url":"https://api.github.com/users/RavnSystems/repos","events_url":"https://api.github.com/users/RavnSystems/events{/privacy}","received_events_url":"https://api.github.com/users/RavnSystems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RavnSystems/ews-java-api","description":"A java client library to access Exchange web services.  The API works against Office 365 Exchange Online as well as on premises Exchange.","fork":true,"url":"https://api.github.com/repos/RavnSystems/ews-java-api","forks_url":"https://api.github.com/repos/RavnSystems/ews-java-api/forks","keys_url":"https://api.github.com/repos/RavnSystems/ews-java-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RavnSystems/ews-java-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RavnSystems/ews-java-api/teams","hooks_url":"https://api.github.com/repos/RavnSystems/ews-java-api/hooks","issue_events_url":"https://api.github.com/repos/RavnSystems/ews-java-api/issues/events{/number}","events_url":"https://api.github.com/repos/RavnSystems/ews-java-api/events","assignees_url":"https://api.github.com/repos/RavnSystems/ews-java-api/assignees{/user}","branches_url":"https://api.github.com/repos/RavnSystems/ews-java-api/branches{/branch}","tags_url":"https://api.github.com/repos/RavnSystems/ews-java-api/tags","blobs_url":"https://api.github.com/repos/RavnSystems/ews-java-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RavnSystems/ews-java-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RavnSystems/ews-java-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/RavnSystems/ews-java-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RavnSystems/ews-java-api/statuses/{sha}","languages_url":"https://api.github.com/repos/RavnSystems/ews-java-api/languages","stargazers_url":"https://api.github.com/repos/RavnSystems/ews-java-api/stargazers","contributors_url":"https://api.github.com/repos/RavnSystems/ews-java-api/contributors","subscribers_url":"https://api.github.com/repos/RavnSystems/ews-java-api/subscribers","subscription_url":"https://api.github.com/repos/RavnSystems/ews-java-api/subscription","commits_url":"https://api.github.com/repos/RavnSystems/ews-java-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/RavnSystems/ews-java-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/RavnSystems/ews-java-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/RavnSystems/ews-java-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/RavnSystems/ews-java-api/contents/{+path}","compare_url":"https://api.github.com/repos/RavnSystems/ews-java-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RavnSystems/ews-java-api/merges","archive_url":"https://api.github.com/repos/RavnSystems/ews-java-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RavnSystems/ews-java-api/downloads","issues_url":"https://api.github.com/repos/RavnSystems/ews-java-api/issues{/number}","pulls_url":"https://api.github.com/repos/RavnSystems/ews-java-api/pulls{/number}","milestones_url":"https://api.github.com/repos/RavnSystems/ews-java-api/milestones{/number}","notifications_url":"https://api.github.com/repos/RavnSystems/ews-java-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RavnSystems/ews-java-api/labels{/name}","releases_url":"https://api.github.com/repos/RavnSystems/ews-java-api/releases{/id}","created_at":"2015-04-16T11:30:20Z","updated_at":"2015-04-16T11:38:57Z","pushed_at":"2015-04-16T11:38:57Z","git_url":"git://github.com/RavnSystems/ews-java-api.git","ssh_url":"git@github.com:RavnSystems/ews-java-api.git","clone_url":"https://github.com/RavnSystems/ews-java-api.git","svn_url":"https://github.com/RavnSystems/ews-java-api","homepage":"","size":9884,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"OfficeDev:master","ref":"master","sha":"2d3ea001fce76ac2b446cfeb3e317cc28ebdcd30","user":{"login":"OfficeDev","id":6789362,"avatar_url":"https://avatars.githubusercontent.com/u/6789362?v=3","gravatar_id":"","url":"https://api.github.com/users/OfficeDev","html_url":"https://github.com/OfficeDev","followers_url":"https://api.github.com/users/OfficeDev/followers","following_url":"https://api.github.com/users/OfficeDev/following{/other_user}","gists_url":"https://api.github.com/users/OfficeDev/gists{/gist_id}","starred_url":"https://api.github.com/users/OfficeDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OfficeDev/subscriptions","organizations_url":"https://api.github.com/users/OfficeDev/orgs","repos_url":"https://api.github.com/users/OfficeDev/repos","events_url":"https://api.github.com/users/OfficeDev/events{/privacy}","received_events_url":"https://api.github.com/users/OfficeDev/received_events","type":"Organization","site_admin":false},"repo":{"id":23322482,"name":"ews-java-api","full_name":"OfficeDev/ews-java-api","owner":{"login":"OfficeDev","id":6789362,"avatar_url":"https://avatars.githubusercontent.com/u/6789362?v=3","gravatar_id":"","url":"https://api.github.com/users/OfficeDev","html_url":"https://github.com/OfficeDev","followers_url":"https://api.github.com/users/OfficeDev/followers","following_url":"https://api.github.com/users/OfficeDev/following{/other_user}","gists_url":"https://api.github.com/users/OfficeDev/gists{/gist_id}","starred_url":"https://api.github.com/users/OfficeDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OfficeDev/subscriptions","organizations_url":"https://api.github.com/users/OfficeDev/orgs","repos_url":"https://api.github.com/users/OfficeDev/repos","events_url":"https://api.github.com/users/OfficeDev/events{/privacy}","received_events_url":"https://api.github.com/users/OfficeDev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OfficeDev/ews-java-api","description":"A java client library to access Exchange web services.  The API works against Office 365 Exchange Online as well as on premises Exchange.","fork":false,"url":"https://api.github.com/repos/OfficeDev/ews-java-api","forks_url":"https://api.github.com/repos/OfficeDev/ews-java-api/forks","keys_url":"https://api.github.com/repos/OfficeDev/ews-java-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OfficeDev/ews-java-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OfficeDev/ews-java-api/teams","hooks_url":"https://api.github.com/repos/OfficeDev/ews-java-api/hooks","issue_events_url":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/events{/number}","events_url":"https://api.github.com/repos/OfficeDev/ews-java-api/events","assignees_url":"https://api.github.com/repos/OfficeDev/ews-java-api/assignees{/user}","branches_url":"https://api.github.com/repos/OfficeDev/ews-java-api/branches{/branch}","tags_url":"https://api.github.com/repos/OfficeDev/ews-java-api/tags","blobs_url":"https://api.github.com/repos/OfficeDev/ews-java-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OfficeDev/ews-java-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OfficeDev/ews-java-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/OfficeDev/ews-java-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OfficeDev/ews-java-api/statuses/{sha}","languages_url":"https://api.github.com/repos/OfficeDev/ews-java-api/languages","stargazers_url":"https://api.github.com/repos/OfficeDev/ews-java-api/stargazers","contributors_url":"https://api.github.com/repos/OfficeDev/ews-java-api/contributors","subscribers_url":"https://api.github.com/repos/OfficeDev/ews-java-api/subscribers","subscription_url":"https://api.github.com/repos/OfficeDev/ews-java-api/subscription","commits_url":"https://api.github.com/repos/OfficeDev/ews-java-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/OfficeDev/ews-java-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/OfficeDev/ews-java-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/OfficeDev/ews-java-api/contents/{+path}","compare_url":"https://api.github.com/repos/OfficeDev/ews-java-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OfficeDev/ews-java-api/merges","archive_url":"https://api.github.com/repos/OfficeDev/ews-java-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OfficeDev/ews-java-api/downloads","issues_url":"https://api.github.com/repos/OfficeDev/ews-java-api/issues{/number}","pulls_url":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls{/number}","milestones_url":"https://api.github.com/repos/OfficeDev/ews-java-api/milestones{/number}","notifications_url":"https://api.github.com/repos/OfficeDev/ews-java-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OfficeDev/ews-java-api/labels{/name}","releases_url":"https://api.github.com/repos/OfficeDev/ews-java-api/releases{/id}","created_at":"2014-08-25T17:33:09Z","updated_at":"2015-04-15T21:54:09Z","pushed_at":"2015-04-16T11:41:22Z","git_url":"git://github.com/OfficeDev/ews-java-api.git","ssh_url":"git@github.com:OfficeDev/ews-java-api.git","clone_url":"https://github.com/OfficeDev/ews-java-api.git","svn_url":"https://github.com/OfficeDev/ews-java-api","homepage":"","size":9884,"stargazers_count":144,"watchers_count":144,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"open_issues_count":73,"forks":107,"open_issues":73,"watchers":144,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/293"},"html":{"href":"https://github.com/OfficeDev/ews-java-api/pull/293"},"issue":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/293"},"comments":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/issues/293/comments"},"review_comments":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/293/comments"},"review_comment":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/pulls/293/commits"},"statuses":{"href":"https://api.github.com/repos/OfficeDev/ews-java-api/statuses/34f70a538a9c2af9693d45f793c2da52230871c6"}}}}