{"action":"created","comment":{"url":"https://api.github.com/repos/testcontainers/testcontainers-java/pulls/comments/360669514","pull_request_review_id":335623791,"id":360669514,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM2MDY2OTUxNA==","diff_hunk":"@@ -52,17 +53,17 @@ static Network newNetwork() {\n         @Singular\n         private Set<Consumer<CreateNetworkCmd>> createNetworkCmdModifiers;\n \n-        private String id;\n+        private final AtomicReference<String> id = new AtomicReference<>();","path":"core/src/main/java/org/testcontainers/containers/Network.java","position":19,"original_position":19,"commit_id":"f277a6c1bc81222592b9b0549418db2a5dc52c90","original_commit_id":"f277a6c1bc81222592b9b0549418db2a5dc52c90","user":{"login":"bsideup","id":1050762,"node_id":"MDQ6VXNlcjEwNTA3NjI=","avatar_url":"https://avatars3.githubusercontent.com/u/1050762?v=4","gravatar_id":"","url":"https://api.github.com/users/bsideup","html_url":"https://github.com/bsideup","followers_url":"https://api.github.com/users/bsideup/followers","following_url":"https://api.github.com/users/bsideup/following{/other_user}","gists_url":"https://api.github.com/users/bsideup/gists{/gist_id}","starred_url":"https://api.github.com/users/bsideup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsideup/subscriptions","organizations_url":"https://api.github.com/users/bsideup/orgs","repos_url":"https://api.github.com/users/bsideup/repos","events_url":"https://api.github.com/users/bsideup/events{/privacy}","received_events_url":"https://api.github.com/users/bsideup/received_events","type":"User","site_admin":false},"body":"also, please do not unresolve other's comments.","created_at":"2019-12-21T21:45:06Z","updated_at":"2019-12-21T21:45:07Z","html_url":"https://github.com/testcontainers/testcontainers-java/pull/2203#discussion_r360669514","pull_request_url":"https://api.github.com/repos/testcontainers/testcontainers-java/pulls/2203","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/testcontainers/testcontainers-java/pulls/comments/360669514"},"html":{"href":"https://github.com/testcontainers/testcontainers-java/pull/2203#discussion_r360669514"},"pull_request":{"href":"https://api.github.com/repos/testcontainers/testcontainers-java/pulls/2203"}},"in_reply_to_id":360668727},"pull_request":{"url":"https://api.github.com/repos/testcontainers/testcontainers-java/pulls/2203","id":355986608,"node_id":"MDExOlB1bGxSZXF1ZXN0MzU1OTg2NjA4","html_url":"https://github.com/testcontainers/testcontainers-java/pull/2203","diff_url":"https://github.com/testcontainers/testcontainers-java/pull/2203.diff","patch_url":"https://github.com/testcontainers/testcontainers-java/pull/2203.patch","issue_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/2203","number":2203,"state":"open","locked":false,"title":"Ensure proper visibility of NetworkImpl#id value and exclude it from the builder","user":{"login":"pivovarit","id":2182533,"node_id":"MDQ6VXNlcjIxODI1MzM=","avatar_url":"https://avatars0.githubusercontent.com/u/2182533?v=4","gravatar_id":"","url":"https://api.github.com/users/pivovarit","html_url":"https://github.com/pivovarit","followers_url":"https://api.github.com/users/pivovarit/followers","following_url":"https://api.github.com/users/pivovarit/following{/other_user}","gists_url":"https://api.github.com/users/pivovarit/gists{/gist_id}","starred_url":"https://api.github.com/users/pivovarit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pivovarit/subscriptions","organizations_url":"https://api.github.com/users/pivovarit/orgs","repos_url":"https://api.github.com/users/pivovarit/repos","events_url":"https://api.github.com/users/pivovarit/events{/privacy}","received_events_url":"https://api.github.com/users/pivovarit/received_events","type":"User","site_admin":false},"body":"`NetworkImpl#id` is internally and lazily initialized and it should not be exposed via the builder. This is achieved by making the field _final_.\r\n\r\nBesides no proper visibility guarantees on `NetworkImpl#id` from `close()`, there was a small chance that someone would try to call `close()` straight after calling `getId()` which would result in a `NullPointerException`. Now, `id` needs to be fully initialized before shutdown attempt.\r\n\r\nAdditionally, I'm not sure what's the roadmap for this class, but `private final AtomicBoolean initialized = new AtomicBoolean();` is no longer needed (one could rely on `id` being null/non-null instead). \r\n\r\n----\r\n\r\nFixes https://github.com/testcontainers/testcontainers-java/issues/2185\r\n","created_at":"2019-12-21T09:33:59Z","updated_at":"2019-12-21T21:45:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dbb6c5afd345b00eacf7e2e29074f764b782f8ff","assignee":null,"assignees":[],"requested_reviewers":[{"login":"rnorth","id":132175,"node_id":"MDQ6VXNlcjEzMjE3NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/132175?v=4","gravatar_id":"","url":"https://api.github.com/users/rnorth","html_url":"https://github.com/rnorth","followers_url":"https://api.github.com/users/rnorth/followers","following_url":"https://api.github.com/users/rnorth/following{/other_user}","gists_url":"https://api.github.com/users/rnorth/gists{/gist_id}","starred_url":"https://api.github.com/users/rnorth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnorth/subscriptions","organizations_url":"https://api.github.com/users/rnorth/orgs","repos_url":"https://api.github.com/users/rnorth/repos","events_url":"https://api.github.com/users/rnorth/events{/privacy}","received_events_url":"https://api.github.com/users/rnorth/received_events","type":"User","site_admin":false},{"login":"kiview","id":5088104,"node_id":"MDQ6VXNlcjUwODgxMDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/5088104?v=4","gravatar_id":"","url":"https://api.github.com/users/kiview","html_url":"https://github.com/kiview","followers_url":"https://api.github.com/users/kiview/followers","following_url":"https://api.github.com/users/kiview/following{/other_user}","gists_url":"https://api.github.com/users/kiview/gists{/gist_id}","starred_url":"https://api.github.com/users/kiview/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiview/subscriptions","organizations_url":"https://api.github.com/users/kiview/orgs","repos_url":"https://api.github.com/users/kiview/repos","events_url":"https://api.github.com/users/kiview/events{/privacy}","received_events_url":"https://api.github.com/users/kiview/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/testcontainers/testcontainers-java/pulls/2203/commits","review_comments_url":"https://api.github.com/repos/testcontainers/testcontainers-java/pulls/2203/comments","review_comment_url":"https://api.github.com/repos/testcontainers/testcontainers-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/2203/comments","statuses_url":"https://api.github.com/repos/testcontainers/testcontainers-java/statuses/f277a6c1bc81222592b9b0549418db2a5dc52c90","head":{"label":"pivovarit:network-builder-fix","ref":"network-builder-fix","sha":"f277a6c1bc81222592b9b0549418db2a5dc52c90","user":{"login":"pivovarit","id":2182533,"node_id":"MDQ6VXNlcjIxODI1MzM=","avatar_url":"https://avatars0.githubusercontent.com/u/2182533?v=4","gravatar_id":"","url":"https://api.github.com/users/pivovarit","html_url":"https://github.com/pivovarit","followers_url":"https://api.github.com/users/pivovarit/followers","following_url":"https://api.github.com/users/pivovarit/following{/other_user}","gists_url":"https://api.github.com/users/pivovarit/gists{/gist_id}","starred_url":"https://api.github.com/users/pivovarit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pivovarit/subscriptions","organizations_url":"https://api.github.com/users/pivovarit/orgs","repos_url":"https://api.github.com/users/pivovarit/repos","events_url":"https://api.github.com/users/pivovarit/events{/privacy}","received_events_url":"https://api.github.com/users/pivovarit/received_events","type":"User","site_admin":false},"repo":{"id":219122754,"node_id":"MDEwOlJlcG9zaXRvcnkyMTkxMjI3NTQ=","name":"testcontainers-java","full_name":"pivovarit/testcontainers-java","private":false,"owner":{"login":"pivovarit","id":2182533,"node_id":"MDQ6VXNlcjIxODI1MzM=","avatar_url":"https://avatars0.githubusercontent.com/u/2182533?v=4","gravatar_id":"","url":"https://api.github.com/users/pivovarit","html_url":"https://github.com/pivovarit","followers_url":"https://api.github.com/users/pivovarit/followers","following_url":"https://api.github.com/users/pivovarit/following{/other_user}","gists_url":"https://api.github.com/users/pivovarit/gists{/gist_id}","starred_url":"https://api.github.com/users/pivovarit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pivovarit/subscriptions","organizations_url":"https://api.github.com/users/pivovarit/orgs","repos_url":"https://api.github.com/users/pivovarit/repos","events_url":"https://api.github.com/users/pivovarit/events{/privacy}","received_events_url":"https://api.github.com/users/pivovarit/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pivovarit/testcontainers-java","description":"Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.","fork":true,"url":"https://api.github.com/repos/pivovarit/testcontainers-java","forks_url":"https://api.github.com/repos/pivovarit/testcontainers-java/forks","keys_url":"https://api.github.com/repos/pivovarit/testcontainers-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pivovarit/testcontainers-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pivovarit/testcontainers-java/teams","hooks_url":"https://api.github.com/repos/pivovarit/testcontainers-java/hooks","issue_events_url":"https://api.github.com/repos/pivovarit/testcontainers-java/issues/events{/number}","events_url":"https://api.github.com/repos/pivovarit/testcontainers-java/events","assignees_url":"https://api.github.com/repos/pivovarit/testcontainers-java/assignees{/user}","branches_url":"https://api.github.com/repos/pivovarit/testcontainers-java/branches{/branch}","tags_url":"https://api.github.com/repos/pivovarit/testcontainers-java/tags","blobs_url":"https://api.github.com/repos/pivovarit/testcontainers-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pivovarit/testcontainers-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pivovarit/testcontainers-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/pivovarit/testcontainers-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pivovarit/testcontainers-java/statuses/{sha}","languages_url":"https://api.github.com/repos/pivovarit/testcontainers-java/languages","stargazers_url":"https://api.github.com/repos/pivovarit/testcontainers-java/stargazers","contributors_url":"https://api.github.com/repos/pivovarit/testcontainers-java/contributors","subscribers_url":"https://api.github.com/repos/pivovarit/testcontainers-java/subscribers","subscription_url":"https://api.github.com/repos/pivovarit/testcontainers-java/subscription","commits_url":"https://api.github.com/repos/pivovarit/testcontainers-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/pivovarit/testcontainers-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/pivovarit/testcontainers-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/pivovarit/testcontainers-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/pivovarit/testcontainers-java/contents/{+path}","compare_url":"https://api.github.com/repos/pivovarit/testcontainers-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pivovarit/testcontainers-java/merges","archive_url":"https://api.github.com/repos/pivovarit/testcontainers-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pivovarit/testcontainers-java/downloads","issues_url":"https://api.github.com/repos/pivovarit/testcontainers-java/issues{/number}","pulls_url":"https://api.github.com/repos/pivovarit/testcontainers-java/pulls{/number}","milestones_url":"https://api.github.com/repos/pivovarit/testcontainers-java/milestones{/number}","notifications_url":"https://api.github.com/repos/pivovarit/testcontainers-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pivovarit/testcontainers-java/labels{/name}","releases_url":"https://api.github.com/repos/pivovarit/testcontainers-java/releases{/id}","deployments_url":"https://api.github.com/repos/pivovarit/testcontainers-java/deployments","created_at":"2019-11-02T08:01:39Z","updated_at":"2019-12-08T10:48:53Z","pushed_at":"2019-12-21T13:55:56Z","git_url":"git://github.com/pivovarit/testcontainers-java.git","ssh_url":"git@github.com:pivovarit/testcontainers-java.git","clone_url":"https://github.com/pivovarit/testcontainers-java.git","svn_url":"https://github.com/pivovarit/testcontainers-java","homepage":"https://testcontainers.org","size":3872,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"testcontainers:master","ref":"master","sha":"e7e05d29a3b733315a2b0e620741e942f3c56fc4","user":{"login":"testcontainers","id":13393021,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzkzMDIx","avatar_url":"https://avatars2.githubusercontent.com/u/13393021?v=4","gravatar_id":"","url":"https://api.github.com/users/testcontainers","html_url":"https://github.com/testcontainers","followers_url":"https://api.github.com/users/testcontainers/followers","following_url":"https://api.github.com/users/testcontainers/following{/other_user}","gists_url":"https://api.github.com/users/testcontainers/gists{/gist_id}","starred_url":"https://api.github.com/users/testcontainers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/testcontainers/subscriptions","organizations_url":"https://api.github.com/users/testcontainers/orgs","repos_url":"https://api.github.com/users/testcontainers/repos","events_url":"https://api.github.com/users/testcontainers/events{/privacy}","received_events_url":"https://api.github.com/users/testcontainers/received_events","type":"Organization","site_admin":false},"repo":{"id":33816473,"node_id":"MDEwOlJlcG9zaXRvcnkzMzgxNjQ3Mw==","name":"testcontainers-java","full_name":"testcontainers/testcontainers-java","private":false,"owner":{"login":"testcontainers","id":13393021,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzkzMDIx","avatar_url":"https://avatars2.githubusercontent.com/u/13393021?v=4","gravatar_id":"","url":"https://api.github.com/users/testcontainers","html_url":"https://github.com/testcontainers","followers_url":"https://api.github.com/users/testcontainers/followers","following_url":"https://api.github.com/users/testcontainers/following{/other_user}","gists_url":"https://api.github.com/users/testcontainers/gists{/gist_id}","starred_url":"https://api.github.com/users/testcontainers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/testcontainers/subscriptions","organizations_url":"https://api.github.com/users/testcontainers/orgs","repos_url":"https://api.github.com/users/testcontainers/repos","events_url":"https://api.github.com/users/testcontainers/events{/privacy}","received_events_url":"https://api.github.com/users/testcontainers/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/testcontainers/testcontainers-java","description":"Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.","fork":false,"url":"https://api.github.com/repos/testcontainers/testcontainers-java","forks_url":"https://api.github.com/repos/testcontainers/testcontainers-java/forks","keys_url":"https://api.github.com/repos/testcontainers/testcontainers-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/testcontainers/testcontainers-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/testcontainers/testcontainers-java/teams","hooks_url":"https://api.github.com/repos/testcontainers/testcontainers-java/hooks","issue_events_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/events{/number}","events_url":"https://api.github.com/repos/testcontainers/testcontainers-java/events","assignees_url":"https://api.github.com/repos/testcontainers/testcontainers-java/assignees{/user}","branches_url":"https://api.github.com/repos/testcontainers/testcontainers-java/branches{/branch}","tags_url":"https://api.github.com/repos/testcontainers/testcontainers-java/tags","blobs_url":"https://api.github.com/repos/testcontainers/testcontainers-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/testcontainers/testcontainers-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/testcontainers/testcontainers-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/testcontainers/testcontainers-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/testcontainers/testcontainers-java/statuses/{sha}","languages_url":"https://api.github.com/repos/testcontainers/testcontainers-java/languages","stargazers_url":"https://api.github.com/repos/testcontainers/testcontainers-java/stargazers","contributors_url":"https://api.github.com/repos/testcontainers/testcontainers-java/contributors","subscribers_url":"https://api.github.com/repos/testcontainers/testcontainers-java/subscribers","subscription_url":"https://api.github.com/repos/testcontainers/testcontainers-java/subscription","commits_url":"https://api.github.com/repos/testcontainers/testcontainers-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/testcontainers/testcontainers-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/testcontainers/testcontainers-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/testcontainers/testcontainers-java/contents/{+path}","compare_url":"https://api.github.com/repos/testcontainers/testcontainers-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/testcontainers/testcontainers-java/merges","archive_url":"https://api.github.com/repos/testcontainers/testcontainers-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/testcontainers/testcontainers-java/downloads","issues_url":"https://api.github.com/repos/testcontainers/testcontainers-java/issues{/number}","pulls_url":"https://api.github.com/repos/testcontainers/testcontainers-java/pulls{/number}","milestones_url":"https://api.github.com/repos/testcontainers/testcontainers-java/milestones{/number}","notifications_url":"https://api.github.com/repos/testcontainers/testcontainers-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/testcontainers/testcontainers-java/labels{/name}","releases_url":"https://api.github.com/repos/testcontainers/testcontainers-java/releases{/id}","deployments_url":"https://api.github.com/repos/testcontainers/testcontainers-java/deployments","created_at":"2015-04-12T12:44:59Z","updated_at":"2019-12-20T11:58:57Z","pushed_at":"2019-12-21T13:59:38Z","git_url":"git://github.com/testcontainers/testcontainers-java.git","ssh_url":"git@github.com:testcontainers/testcontainers-java.git","clone_url":"https://github.com/testcontainers/testcontainers-java.git","svn_url":"https://github.com/testcontainers/testcontainers-java","homepage":"https://testcontainers.org","size":3761,"stargazers_count":3239,"watchers_count":3239,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":608,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":233,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":608,"open_issues":233,"watchers":3239,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/testcontainers/testcontainers-java/pulls/2203"},"html":{"href":"https://github.com/testcontainers/testcontainers-java/pull/2203"},"issue":{"href":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/2203"},"comments":{"href":"https://api.github.com/repos/testcontainers/testcontainers-java/issues/2203/comments"},"review_comments":{"href":"https://api.github.com/repos/testcontainers/testcontainers-java/pulls/2203/comments"},"review_comment":{"href":"https://api.github.com/repos/testcontainers/testcontainers-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/testcontainers/testcontainers-java/pulls/2203/commits"},"statuses":{"href":"https://api.github.com/repos/testcontainers/testcontainers-java/statuses/f277a6c1bc81222592b9b0549418db2a5dc52c90"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bsideup"}}