{"action":"created","issue":{"url":"https://api.github.com/repos/google/guava/issues/2238","labels_url":"https://api.github.com/repos/google/guava/issues/2238/labels{/name}","comments_url":"https://api.github.com/repos/google/guava/issues/2238/comments","events_url":"https://api.github.com/repos/google/guava/issues/2238/events","html_url":"https://github.com/google/guava/issues/2238","id":119244619,"number":2238,"title":"X.tryParse inconsitencies","user":{"login":"osundblad","id":1138395,"avatar_url":"https://avatars.githubusercontent.com/u/1138395?v=3","gravatar_id":"","url":"https://api.github.com/users/osundblad","html_url":"https://github.com/osundblad","followers_url":"https://api.github.com/users/osundblad/followers","following_url":"https://api.github.com/users/osundblad/following{/other_user}","gists_url":"https://api.github.com/users/osundblad/gists{/gist_id}","starred_url":"https://api.github.com/users/osundblad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osundblad/subscriptions","organizations_url":"https://api.github.com/users/osundblad/orgs","repos_url":"https://api.github.com/users/osundblad/repos","events_url":"https://api.github.com/users/osundblad/events{/privacy}","received_events_url":"https://api.github.com/users/osundblad/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/google/guava/labels/package:%20primitives","name":"package: primitives","color":"207de5"},{"url":"https://api.github.com/repos/google/guava/labels/type:%20defect","name":"type: defect","color":"e11d21"}],"state":"closed","locked":false,"assignee":{"login":"kluever","id":2036304,"avatar_url":"https://avatars.githubusercontent.com/u/2036304?v=3","gravatar_id":"","url":"https://api.github.com/users/kluever","html_url":"https://github.com/kluever","followers_url":"https://api.github.com/users/kluever/followers","following_url":"https://api.github.com/users/kluever/following{/other_user}","gists_url":"https://api.github.com/users/kluever/gists{/gist_id}","starred_url":"https://api.github.com/users/kluever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kluever/subscriptions","organizations_url":"https://api.github.com/users/kluever/orgs","repos_url":"https://api.github.com/users/kluever/repos","events_url":"https://api.github.com/users/kluever/events{/privacy}","received_events_url":"https://api.github.com/users/kluever/received_events","type":"User","site_admin":false},"milestone":null,"comments":10,"created_at":"2015-11-27T20:45:40Z","updated_at":"2016-01-15T19:36:27Z","closed_at":"2016-01-15T19:36:27Z","body":"The `tryParse` methods should behave similarly: \r\n```\r\nDoubles.tryParse(null)  -> null\r\nFloats.tryParse(null)   -> null\r\nLongs.tryParse(null)    -> NPE\r\nInts.tryParse(null)     -> NPE\r\n```\r\nFor a method like this I would prefer the null result since otherwise I would use the Java parseInt. But if they all should throw NPE I think that should be clearer in the JavaDoc (even if you normally do not document @NotNull parameters)."},"comment":{"url":"https://api.github.com/repos/google/guava/issues/comments/172062940","html_url":"https://github.com/google/guava/issues/2238#issuecomment-172062940","issue_url":"https://api.github.com/repos/google/guava/issues/2238","id":172062940,"user":{"login":"kluever","id":2036304,"avatar_url":"https://avatars.githubusercontent.com/u/2036304?v=3","gravatar_id":"","url":"https://api.github.com/users/kluever","html_url":"https://github.com/kluever","followers_url":"https://api.github.com/users/kluever/followers","following_url":"https://api.github.com/users/kluever/following{/other_user}","gists_url":"https://api.github.com/users/kluever/gists{/gist_id}","starred_url":"https://api.github.com/users/kluever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kluever/subscriptions","organizations_url":"https://api.github.com/users/kluever/orgs","repos_url":"https://api.github.com/users/kluever/repos","events_url":"https://api.github.com/users/kluever/events{/privacy}","received_events_url":"https://api.github.com/users/kluever/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T19:36:27Z","updated_at":"2016-01-15T19:36:27Z","body":"@osundblad I still don't understand how you're getting `null` back from `Doubles.tryParse(null)`. What version of Guava are you using?\r\n\r\nPlease see my test cases above. The methods are behaving exactly as they should (they throw a `NullPointerException` when passed `null`)."}}