{"action":"created","issue":{"url":"https://api.github.com/repos/google/guava/issues/2420","repository_url":"https://api.github.com/repos/google/guava","labels_url":"https://api.github.com/repos/google/guava/issues/2420/labels{/name}","comments_url":"https://api.github.com/repos/google/guava/issues/2420/comments","events_url":"https://api.github.com/repos/google/guava/issues/2420/events","html_url":"https://github.com/google/guava/pull/2420","id":140532551,"number":2420,"title":"Allowing Range.intersect to return empty sets when ranges are not connected","user":{"login":"alfredodiaz","id":1232762,"avatar_url":"https://avatars.githubusercontent.com/u/1232762?v=3","gravatar_id":"","url":"https://api.github.com/users/alfredodiaz","html_url":"https://github.com/alfredodiaz","followers_url":"https://api.github.com/users/alfredodiaz/followers","following_url":"https://api.github.com/users/alfredodiaz/following{/other_user}","gists_url":"https://api.github.com/users/alfredodiaz/gists{/gist_id}","starred_url":"https://api.github.com/users/alfredodiaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfredodiaz/subscriptions","organizations_url":"https://api.github.com/users/alfredodiaz/orgs","repos_url":"https://api.github.com/users/alfredodiaz/repos","events_url":"https://api.github.com/users/alfredodiaz/events{/privacy}","received_events_url":"https://api.github.com/users/alfredodiaz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/google/guava/labels/cla:%20yes","name":"cla: yes","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-13T21:43:59Z","updated_at":"2016-03-13T21:48:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/google/guava/pulls/2420","html_url":"https://github.com/google/guava/pull/2420","diff_url":"https://github.com/google/guava/pull/2420.diff","patch_url":"https://github.com/google/guava/pull/2420.patch"},"body":"When I am working with ranges that sometimes are connected and sometimes not, It is a litle cumbersome to have to check if the ranges are connected before any calling to the intersection method.\r\n\r\nI added a new intersection method with a new optional flag parameter \"_allowEmptyRanges_\". When this flag is true, the method will return an empty set when ranges are not connected (instead of throwing an IllegalArgumentException).\r\n\r\nThe change is backward-compatible but I have included specitifc unit tests for this little change.\r\n\r\nI would be glad to hear any comments from you."},"comment":{"url":"https://api.github.com/repos/google/guava/issues/comments/196058353","html_url":"https://github.com/google/guava/pull/2420#issuecomment-196058353","issue_url":"https://api.github.com/repos/google/guava/issues/2420","id":196058353,"user":{"login":"googlebot","id":5384588,"avatar_url":"https://avatars.githubusercontent.com/u/5384588?v=3","gravatar_id":"","url":"https://api.github.com/users/googlebot","html_url":"https://github.com/googlebot","followers_url":"https://api.github.com/users/googlebot/followers","following_url":"https://api.github.com/users/googlebot/following{/other_user}","gists_url":"https://api.github.com/users/googlebot/gists{/gist_id}","starred_url":"https://api.github.com/users/googlebot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googlebot/subscriptions","organizations_url":"https://api.github.com/users/googlebot/orgs","repos_url":"https://api.github.com/users/googlebot/repos","events_url":"https://api.github.com/users/googlebot/events{/privacy}","received_events_url":"https://api.github.com/users/googlebot/received_events","type":"User","site_admin":false},"created_at":"2016-03-13T21:48:43Z","updated_at":"2016-03-13T21:48:43Z","body":"CLAs look good, thanks!\n\n<!-- ok -->"}}