{"action":"created","comment":{"url":"https://api.github.com/repos/scala-js/scala-js/pulls/comments/37509051","id":37509051,"diff_hunk":"@@ -0,0 +1,119 @@\n+/*                     __                                               *\\\n+**     ________ ___   / /  ___      __ ____  Scala.js Test Suite        **\n+**    / __/ __// _ | / /  / _ | __ / // __/  (c) 2013, LAMP/EPFL        **\n+**  __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\    http://scala-js.org/       **\n+** /____/\\___/_/ |_/____/_/ | |__/ /____/                               **\n+**                          |/____/                                     **\n+\\*                                                                      */\n+package org.scalajs.testsuite.javalib.util.concurrent\n+\n+import org.scalajs.jasminetest.JasmineTest\n+import java.util.concurrent.ThreadLocalRandom\n+import scala.util.Random\n+import scala.math.abs\n+import scala.math.max\n+import scala.math.min\n+\n+import org.scalajs.testsuite.javalib.ExpectExceptions\n+\n+object ThreadLocalRandomTest extends JasmineTest with ExpectExceptions {\n+\n+  describe(\"java.util.concurrent.ThreadLocalRandom\") {\n+\n+    it(\"should throw exception on setSeed\") {\n+      val tlr = ThreadLocalRandom.current()\n+\n+      expectThrows[UnsupportedOperationException](tlr.setSeed(1))\n+    }\n+\n+    it(\"should return nextInt that fits bounds\") {\n+      val tlr = ThreadLocalRandom.current()\n+\n+      for (_ <- 1 to 100) {\n+        val one = Random.nextInt()\n+        //to have at least one positive for bound\n+        val two = abs(Random.nextInt())","path":"test-suite/src/test/scala/org/scalajs/testsuite/javalib/util/concurrent/ThreadLocalRandomTest.scala","position":35,"original_position":35,"commit_id":"c62afe050a67e9969bf0c84c461c537a762ac361","original_commit_id":"c62afe050a67e9969bf0c84c461c537a762ac361","user":{"login":"sjrd","id":535934,"avatar_url":"https://avatars.githubusercontent.com/u/535934?v=3","gravatar_id":"","url":"https://api.github.com/users/sjrd","html_url":"https://github.com/sjrd","followers_url":"https://api.github.com/users/sjrd/followers","following_url":"https://api.github.com/users/sjrd/following{/other_user}","gists_url":"https://api.github.com/users/sjrd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjrd/subscriptions","organizations_url":"https://api.github.com/users/sjrd/orgs","repos_url":"https://api.github.com/users/sjrd/repos","events_url":"https://api.github.com/users/sjrd/events{/privacy}","received_events_url":"https://api.github.com/users/sjrd/received_events","type":"User","site_admin":false},"body":"It is not necessary that `bound` be positive. `abs` is not needed.\r\nHowever, you need to avoid the situation where you end up with `one == two`. You should skip the turn (or retry until you get something different, or use `two + 1` instead of `two`).","created_at":"2015-08-20T09:08:02Z","updated_at":"2015-08-20T09:08:02Z","html_url":"https://github.com/scala-js/scala-js/pull/1861#discussion_r37509051","pull_request_url":"https://api.github.com/repos/scala-js/scala-js/pulls/1861","_links":{"self":{"href":"https://api.github.com/repos/scala-js/scala-js/pulls/comments/37509051"},"html":{"href":"https://github.com/scala-js/scala-js/pull/1861#discussion_r37509051"},"pull_request":{"href":"https://api.github.com/repos/scala-js/scala-js/pulls/1861"}}},"pull_request":{"url":"https://api.github.com/repos/scala-js/scala-js/pulls/1861","id":42900708,"html_url":"https://github.com/scala-js/scala-js/pull/1861","diff_url":"https://github.com/scala-js/scala-js/pull/1861.diff","patch_url":"https://github.com/scala-js/scala-js/pull/1861.patch","issue_url":"https://api.github.com/repos/scala-js/scala-js/issues/1861","number":1861,"state":"open","locked":false,"title":"Implement java.util.concurrent.ThreadLocalRandom.","user":{"login":"andreaTP","id":5792097,"avatar_url":"https://avatars.githubusercontent.com/u/5792097?v=3","gravatar_id":"","url":"https://api.github.com/users/andreaTP","html_url":"https://github.com/andreaTP","followers_url":"https://api.github.com/users/andreaTP/followers","following_url":"https://api.github.com/users/andreaTP/following{/other_user}","gists_url":"https://api.github.com/users/andreaTP/gists{/gist_id}","starred_url":"https://api.github.com/users/andreaTP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreaTP/subscriptions","organizations_url":"https://api.github.com/users/andreaTP/orgs","repos_url":"https://api.github.com/users/andreaTP/repos","events_url":"https://api.github.com/users/andreaTP/events{/privacy}","received_events_url":"https://api.github.com/users/andreaTP/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-20T07:49:43Z","updated_at":"2015-08-20T09:08:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e720078a46b131e579a7cd01ec8c3c15933e8037","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scala-js/scala-js/pulls/1861/commits","review_comments_url":"https://api.github.com/repos/scala-js/scala-js/pulls/1861/comments","review_comment_url":"https://api.github.com/repos/scala-js/scala-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scala-js/scala-js/issues/1861/comments","statuses_url":"https://api.github.com/repos/scala-js/scala-js/statuses/c62afe050a67e9969bf0c84c461c537a762ac361","head":{"label":"andreaTP:threadLocalRandom","ref":"threadLocalRandom","sha":"c62afe050a67e9969bf0c84c461c537a762ac361","user":{"login":"andreaTP","id":5792097,"avatar_url":"https://avatars.githubusercontent.com/u/5792097?v=3","gravatar_id":"","url":"https://api.github.com/users/andreaTP","html_url":"https://github.com/andreaTP","followers_url":"https://api.github.com/users/andreaTP/followers","following_url":"https://api.github.com/users/andreaTP/following{/other_user}","gists_url":"https://api.github.com/users/andreaTP/gists{/gist_id}","starred_url":"https://api.github.com/users/andreaTP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreaTP/subscriptions","organizations_url":"https://api.github.com/users/andreaTP/orgs","repos_url":"https://api.github.com/users/andreaTP/repos","events_url":"https://api.github.com/users/andreaTP/events{/privacy}","received_events_url":"https://api.github.com/users/andreaTP/received_events","type":"User","site_admin":false},"repo":{"id":34802802,"name":"scala-js","full_name":"andreaTP/scala-js","owner":{"login":"andreaTP","id":5792097,"avatar_url":"https://avatars.githubusercontent.com/u/5792097?v=3","gravatar_id":"","url":"https://api.github.com/users/andreaTP","html_url":"https://github.com/andreaTP","followers_url":"https://api.github.com/users/andreaTP/followers","following_url":"https://api.github.com/users/andreaTP/following{/other_user}","gists_url":"https://api.github.com/users/andreaTP/gists{/gist_id}","starred_url":"https://api.github.com/users/andreaTP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreaTP/subscriptions","organizations_url":"https://api.github.com/users/andreaTP/orgs","repos_url":"https://api.github.com/users/andreaTP/repos","events_url":"https://api.github.com/users/andreaTP/events{/privacy}","received_events_url":"https://api.github.com/users/andreaTP/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andreaTP/scala-js","description":"Scala.js, the Scala to JavaScript compiler","fork":true,"url":"https://api.github.com/repos/andreaTP/scala-js","forks_url":"https://api.github.com/repos/andreaTP/scala-js/forks","keys_url":"https://api.github.com/repos/andreaTP/scala-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andreaTP/scala-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andreaTP/scala-js/teams","hooks_url":"https://api.github.com/repos/andreaTP/scala-js/hooks","issue_events_url":"https://api.github.com/repos/andreaTP/scala-js/issues/events{/number}","events_url":"https://api.github.com/repos/andreaTP/scala-js/events","assignees_url":"https://api.github.com/repos/andreaTP/scala-js/assignees{/user}","branches_url":"https://api.github.com/repos/andreaTP/scala-js/branches{/branch}","tags_url":"https://api.github.com/repos/andreaTP/scala-js/tags","blobs_url":"https://api.github.com/repos/andreaTP/scala-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andreaTP/scala-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andreaTP/scala-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/andreaTP/scala-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andreaTP/scala-js/statuses/{sha}","languages_url":"https://api.github.com/repos/andreaTP/scala-js/languages","stargazers_url":"https://api.github.com/repos/andreaTP/scala-js/stargazers","contributors_url":"https://api.github.com/repos/andreaTP/scala-js/contributors","subscribers_url":"https://api.github.com/repos/andreaTP/scala-js/subscribers","subscription_url":"https://api.github.com/repos/andreaTP/scala-js/subscription","commits_url":"https://api.github.com/repos/andreaTP/scala-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/andreaTP/scala-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/andreaTP/scala-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/andreaTP/scala-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/andreaTP/scala-js/contents/{+path}","compare_url":"https://api.github.com/repos/andreaTP/scala-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andreaTP/scala-js/merges","archive_url":"https://api.github.com/repos/andreaTP/scala-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andreaTP/scala-js/downloads","issues_url":"https://api.github.com/repos/andreaTP/scala-js/issues{/number}","pulls_url":"https://api.github.com/repos/andreaTP/scala-js/pulls{/number}","milestones_url":"https://api.github.com/repos/andreaTP/scala-js/milestones{/number}","notifications_url":"https://api.github.com/repos/andreaTP/scala-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andreaTP/scala-js/labels{/name}","releases_url":"https://api.github.com/repos/andreaTP/scala-js/releases{/id}","created_at":"2015-04-29T15:44:28Z","updated_at":"2015-05-08T05:56:23Z","pushed_at":"2015-08-20T08:51:37Z","git_url":"git://github.com/andreaTP/scala-js.git","ssh_url":"git@github.com:andreaTP/scala-js.git","clone_url":"https://github.com/andreaTP/scala-js.git","svn_url":"https://github.com/andreaTP/scala-js","homepage":"http://www.scala-js.org/","size":9455,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"scala-js:master","ref":"master","sha":"44bb496affc567b9657f4334990bf4f986ca23ea","user":{"login":"scala-js","id":6039724,"avatar_url":"https://avatars.githubusercontent.com/u/6039724?v=3","gravatar_id":"","url":"https://api.github.com/users/scala-js","html_url":"https://github.com/scala-js","followers_url":"https://api.github.com/users/scala-js/followers","following_url":"https://api.github.com/users/scala-js/following{/other_user}","gists_url":"https://api.github.com/users/scala-js/gists{/gist_id}","starred_url":"https://api.github.com/users/scala-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scala-js/subscriptions","organizations_url":"https://api.github.com/users/scala-js/orgs","repos_url":"https://api.github.com/users/scala-js/repos","events_url":"https://api.github.com/users/scala-js/events{/privacy}","received_events_url":"https://api.github.com/users/scala-js/received_events","type":"Organization","site_admin":false},"repo":{"id":8272315,"name":"scala-js","full_name":"scala-js/scala-js","owner":{"login":"scala-js","id":6039724,"avatar_url":"https://avatars.githubusercontent.com/u/6039724?v=3","gravatar_id":"","url":"https://api.github.com/users/scala-js","html_url":"https://github.com/scala-js","followers_url":"https://api.github.com/users/scala-js/followers","following_url":"https://api.github.com/users/scala-js/following{/other_user}","gists_url":"https://api.github.com/users/scala-js/gists{/gist_id}","starred_url":"https://api.github.com/users/scala-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scala-js/subscriptions","organizations_url":"https://api.github.com/users/scala-js/orgs","repos_url":"https://api.github.com/users/scala-js/repos","events_url":"https://api.github.com/users/scala-js/events{/privacy}","received_events_url":"https://api.github.com/users/scala-js/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scala-js/scala-js","description":"Scala.js, the Scala to JavaScript compiler","fork":false,"url":"https://api.github.com/repos/scala-js/scala-js","forks_url":"https://api.github.com/repos/scala-js/scala-js/forks","keys_url":"https://api.github.com/repos/scala-js/scala-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scala-js/scala-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scala-js/scala-js/teams","hooks_url":"https://api.github.com/repos/scala-js/scala-js/hooks","issue_events_url":"https://api.github.com/repos/scala-js/scala-js/issues/events{/number}","events_url":"https://api.github.com/repos/scala-js/scala-js/events","assignees_url":"https://api.github.com/repos/scala-js/scala-js/assignees{/user}","branches_url":"https://api.github.com/repos/scala-js/scala-js/branches{/branch}","tags_url":"https://api.github.com/repos/scala-js/scala-js/tags","blobs_url":"https://api.github.com/repos/scala-js/scala-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scala-js/scala-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scala-js/scala-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/scala-js/scala-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scala-js/scala-js/statuses/{sha}","languages_url":"https://api.github.com/repos/scala-js/scala-js/languages","stargazers_url":"https://api.github.com/repos/scala-js/scala-js/stargazers","contributors_url":"https://api.github.com/repos/scala-js/scala-js/contributors","subscribers_url":"https://api.github.com/repos/scala-js/scala-js/subscribers","subscription_url":"https://api.github.com/repos/scala-js/scala-js/subscription","commits_url":"https://api.github.com/repos/scala-js/scala-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/scala-js/scala-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/scala-js/scala-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/scala-js/scala-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/scala-js/scala-js/contents/{+path}","compare_url":"https://api.github.com/repos/scala-js/scala-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scala-js/scala-js/merges","archive_url":"https://api.github.com/repos/scala-js/scala-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scala-js/scala-js/downloads","issues_url":"https://api.github.com/repos/scala-js/scala-js/issues{/number}","pulls_url":"https://api.github.com/repos/scala-js/scala-js/pulls{/number}","milestones_url":"https://api.github.com/repos/scala-js/scala-js/milestones{/number}","notifications_url":"https://api.github.com/repos/scala-js/scala-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scala-js/scala-js/labels{/name}","releases_url":"https://api.github.com/repos/scala-js/scala-js/releases{/id}","created_at":"2013-02-18T16:33:55Z","updated_at":"2015-08-19T17:15:52Z","pushed_at":"2015-08-20T08:51:37Z","git_url":"git://github.com/scala-js/scala-js.git","ssh_url":"git@github.com:scala-js/scala-js.git","clone_url":"https://github.com/scala-js/scala-js.git","svn_url":"https://github.com/scala-js/scala-js","homepage":"http://www.scala-js.org/","size":16921,"stargazers_count":1795,"watchers_count":1795,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":160,"mirror_url":null,"open_issues_count":68,"forks":160,"open_issues":68,"watchers":1795,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scala-js/scala-js/pulls/1861"},"html":{"href":"https://github.com/scala-js/scala-js/pull/1861"},"issue":{"href":"https://api.github.com/repos/scala-js/scala-js/issues/1861"},"comments":{"href":"https://api.github.com/repos/scala-js/scala-js/issues/1861/comments"},"review_comments":{"href":"https://api.github.com/repos/scala-js/scala-js/pulls/1861/comments"},"review_comment":{"href":"https://api.github.com/repos/scala-js/scala-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scala-js/scala-js/pulls/1861/commits"},"statuses":{"href":"https://api.github.com/repos/scala-js/scala-js/statuses/c62afe050a67e9969bf0c84c461c537a762ac361"}}}}