GitHub PullRequestReviewCommentEvent at 2014-10-29 20:44:28
Repository: nexus-oss
Actor: mrprescott
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/sonatype/nexus-oss/pulls/comments/19570956","id":19570956,"diff_hunk":"@@ -0,0 +1,110 @@\n+/*\n+ * Sonatype Nexus (TM) Open Source Version\n+ * Copyright (c) 2007-2014 Sonatype, Inc.\n+ * All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions.\n+ *\n+ * This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0,\n+ * which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html.\n+ *\n+ * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. \"Sonatype\" and \"Sonatype Nexus\" are trademarks\n+ * of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the\n+ * Eclipse Foundation. All other trademarks are the property of their respective owners.\n+ */\n+package org.sonatype.nexus.component.source.internal;\n+\n+import java.io.IOException;\n+\n+import javax.annotation.Nullable;\n+\n+import org.sonatype.nexus.component.model.Component;\n+import org.sonatype.nexus.component.source.api.ComponentEnvelope;\n+import org.sonatype.nexus.component.source.api.ComponentRequest;\n+import org.sonatype.nexus.component.source.api.ComponentSourceId;\n+import org.sonatype.nexus.component.source.api.PullComponentSource;\n+import org.sonatype.nexus.component.source.api.support.AutoBlockState;\n+import org.sonatype.sisu.goodies.common.ComponentSupport;\n+\n+import org.joda.time.DateTime;\n+\n+import static com.google.common.base.Preconditions.checkNotNull;\n+import static com.google.common.base.Preconditions.checkState;\n+\n+/**\n+ * A {@link PullComponentSource} wrapper which can be disabled by the registry, to prevent out-of-date source instances\n+ * from being held by handlers indefinitely.\n+ *\n+ * @since 3.0\n+ */\n+public class ComponentSourceSleeve\n+    extends ComponentSupport\n+    implements PullComponentSource\n+{\n+  private boolean disabled = false;\n+\n+  private final PullComponentSource source;\n+\n+  private final ComponentSourceId sourceId;\n+\n+  public ComponentSourceSleeve(final PullComponentSource source) {\n+    this.source = checkNotNull(source);\n+    this.sourceId = checkNotNull(source.getId());\n+  }\n+\n+  @Override\n+  public ComponentSourceId getId() {\n+    return sourceId;\n+  }\n+\n+  public void disable() {","path":"components/nexus-component-source-api/src/main/java/org/sonatype/nexus/component/source/internal/ComponentSourceSleeve.java","position":58,"original_position":58,"commit_id":"a77edce2cd089dc8924f80959d77ed838d39e0b8","original_commit_id":"a77edce2cd089dc8924f80959d77ed838d39e0b8","user":{"login":"mrprescott","id":2325642,"avatar_url":"https://avatars.githubusercontent.com/u/2325642?v=2","gravatar_id":"","url":"https://api.github.com/users/mrprescott","html_url":"https://github.com/mrprescott","followers_url":"https://api.github.com/users/mrprescott/followers","following_url":"https://api.github.com/users/mrprescott/following{/other_user}","gists_url":"https://api.github.com/users/mrprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/mrprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrprescott/subscriptions","organizations_url":"https://api.github.com/users/mrprescott/orgs","repos_url":"https://api.github.com/users/mrprescott/repos","events_url":"https://api.github.com/users/mrprescott/events{/privacy}","received_events_url":"https://api.github.com/users/mrprescott/received_events","type":"User","site_admin":false},"body":"No, my bad, the word 'enabled' has an overloaded meaning. This method basically just cripples the sleeve because the wrapped source has been removed from the registry.","created_at":"2014-10-29T20:44:28Z","updated_at":"2014-10-29T20:44:28Z","html_url":"https://github.com/sonatype/nexus-oss/pull/834#discussion_r19570956","pull_request_url":"https://api.github.com/repos/sonatype/nexus-oss/pulls/834","_links":{"self":{"href":"https://api.github.com/repos/sonatype/nexus-oss/pulls/comments/19570956"},"html":{"href":"https://github.com/sonatype/nexus-oss/pull/834#discussion_r19570956"},"pull_request":{"href":"https://api.github.com/repos/sonatype/nexus-oss/pulls/834"}}},"pull_request":{"url":"https://api.github.com/repos/sonatype/nexus-oss/pulls/834","id":23474462,"html_url":"https://github.com/sonatype/nexus-oss/pull/834","diff_url":"https://github.com/sonatype/nexus-oss/pull/834.diff","patch_url":"https://github.com/sonatype/nexus-oss/pull/834.patch","issue_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/834","number":834,"state":"open","locked":false,"title":"NEXUS-7588 Component Source Availability","user":{"login":"mrprescott","id":2325642,"avatar_url":"https://avatars.githubusercontent.com/u/2325642?v=2","gravatar_id":"","url":"https://api.github.com/users/mrprescott","html_url":"https://github.com/mrprescott","followers_url":"https://api.github.com/users/mrprescott/followers","following_url":"https://api.github.com/users/mrprescott/following{/other_user}","gists_url":"https://api.github.com/users/mrprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/mrprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrprescott/subscriptions","organizations_url":"https://api.github.com/users/mrprescott/orgs","repos_url":"https://api.github.com/users/mrprescott/repos","events_url":"https://api.github.com/users/mrprescott/events{/privacy}","received_events_url":"https://api.github.com/users/mrprescott/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-28T17:27:15Z","updated_at":"2014-10-29T20:44:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"acaf2a2117afd5777ce98abb740424df06cf0e30","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sonatype/nexus-oss/pulls/834/commits","review_comments_url":"https://api.github.com/repos/sonatype/nexus-oss/pulls/834/comments","review_comment_url":"https://api.github.com/repos/sonatype/nexus-oss/pulls/comments/{number}","comments_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/834/comments","statuses_url":"https://api.github.com/repos/sonatype/nexus-oss/statuses/a77edce2cd089dc8924f80959d77ed838d39e0b8","head":{"label":"sonatype:NEXUS-7588-component-source-avail","ref":"NEXUS-7588-component-source-avail","sha":"a77edce2cd089dc8924f80959d77ed838d39e0b8","user":{"login":"sonatype","id":44938,"avatar_url":"https://avatars.githubusercontent.com/u/44938?v=2","gravatar_id":"","url":"https://api.github.com/users/sonatype","html_url":"https://github.com/sonatype","followers_url":"https://api.github.com/users/sonatype/followers","following_url":"https://api.github.com/users/sonatype/following{/other_user}","gists_url":"https://api.github.com/users/sonatype/gists{/gist_id}","starred_url":"https://api.github.com/users/sonatype/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonatype/subscriptions","organizations_url":"https://api.github.com/users/sonatype/orgs","repos_url":"https://api.github.com/users/sonatype/repos","events_url":"https://api.github.com/users/sonatype/events{/privacy}","received_events_url":"https://api.github.com/users/sonatype/received_events","type":"Organization","site_admin":false},"repo":{"id":10146961,"name":"nexus-oss","full_name":"sonatype/nexus-oss","owner":{"login":"sonatype","id":44938,"avatar_url":"https://avatars.githubusercontent.com/u/44938?v=2","gravatar_id":"","url":"https://api.github.com/users/sonatype","html_url":"https://github.com/sonatype","followers_url":"https://api.github.com/users/sonatype/followers","following_url":"https://api.github.com/users/sonatype/following{/other_user}","gists_url":"https://api.github.com/users/sonatype/gists{/gist_id}","starred_url":"https://api.github.com/users/sonatype/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonatype/subscriptions","organizations_url":"https://api.github.com/users/sonatype/orgs","repos_url":"https://api.github.com/users/sonatype/repos","events_url":"https://api.github.com/users/sonatype/events{/privacy}","received_events_url":"https://api.github.com/users/sonatype/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sonatype/nexus-oss","description":"Sonatype Nexus OSS","fork":false,"url":"https://api.github.com/repos/sonatype/nexus-oss","forks_url":"https://api.github.com/repos/sonatype/nexus-oss/forks","keys_url":"https://api.github.com/repos/sonatype/nexus-oss/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonatype/nexus-oss/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonatype/nexus-oss/teams","hooks_url":"https://api.github.com/repos/sonatype/nexus-oss/hooks","issue_events_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/events{/number}","events_url":"https://api.github.com/repos/sonatype/nexus-oss/events","assignees_url":"https://api.github.com/repos/sonatype/nexus-oss/assignees{/user}","branches_url":"https://api.github.com/repos/sonatype/nexus-oss/branches{/branch}","tags_url":"https://api.github.com/repos/sonatype/nexus-oss/tags","blobs_url":"https://api.github.com/repos/sonatype/nexus-oss/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonatype/nexus-oss/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonatype/nexus-oss/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonatype/nexus-oss/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonatype/nexus-oss/statuses/{sha}","languages_url":"https://api.github.com/repos/sonatype/nexus-oss/languages","stargazers_url":"https://api.github.com/repos/sonatype/nexus-oss/stargazers","contributors_url":"https://api.github.com/repos/sonatype/nexus-oss/contributors","subscribers_url":"https://api.github.com/repos/sonatype/nexus-oss/subscribers","subscription_url":"https://api.github.com/repos/sonatype/nexus-oss/subscription","commits_url":"https://api.github.com/repos/sonatype/nexus-oss/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonatype/nexus-oss/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonatype/nexus-oss/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/comments/{number}","contents_url":"https://api.github.com/repos/sonatype/nexus-oss/contents/{+path}","compare_url":"https://api.github.com/repos/sonatype/nexus-oss/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonatype/nexus-oss/merges","archive_url":"https://api.github.com/repos/sonatype/nexus-oss/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonatype/nexus-oss/downloads","issues_url":"https://api.github.com/repos/sonatype/nexus-oss/issues{/number}","pulls_url":"https://api.github.com/repos/sonatype/nexus-oss/pulls{/number}","milestones_url":"https://api.github.com/repos/sonatype/nexus-oss/milestones{/number}","notifications_url":"https://api.github.com/repos/sonatype/nexus-oss/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonatype/nexus-oss/labels{/name}","releases_url":"https://api.github.com/repos/sonatype/nexus-oss/releases{/id}","created_at":"2013-05-18T20:48:57Z","updated_at":"2014-10-21T19:56:05Z","pushed_at":"2014-10-29T20:27:39Z","git_url":"git://github.com/sonatype/nexus-oss.git","ssh_url":"git@github.com:sonatype/nexus-oss.git","clone_url":"https://github.com/sonatype/nexus-oss.git","svn_url":"https://github.com/sonatype/nexus-oss","homepage":"http://links.sonatype.com/products/nexus/oss/home","size":790170,"stargazers_count":107,"watchers_count":107,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":66,"mirror_url":null,"open_issues_count":15,"forks":66,"open_issues":15,"watchers":107,"default_branch":"master"}},"base":{"label":"sonatype:master","ref":"master","sha":"e783a5ee3244b08a18ce5d84f4ee4e50fc798a5d","user":{"login":"sonatype","id":44938,"avatar_url":"https://avatars.githubusercontent.com/u/44938?v=2","gravatar_id":"","url":"https://api.github.com/users/sonatype","html_url":"https://github.com/sonatype","followers_url":"https://api.github.com/users/sonatype/followers","following_url":"https://api.github.com/users/sonatype/following{/other_user}","gists_url":"https://api.github.com/users/sonatype/gists{/gist_id}","starred_url":"https://api.github.com/users/sonatype/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonatype/subscriptions","organizations_url":"https://api.github.com/users/sonatype/orgs","repos_url":"https://api.github.com/users/sonatype/repos","events_url":"https://api.github.com/users/sonatype/events{/privacy}","received_events_url":"https://api.github.com/users/sonatype/received_events","type":"Organization","site_admin":false},"repo":{"id":10146961,"name":"nexus-oss","full_name":"sonatype/nexus-oss","owner":{"login":"sonatype","id":44938,"avatar_url":"https://avatars.githubusercontent.com/u/44938?v=2","gravatar_id":"","url":"https://api.github.com/users/sonatype","html_url":"https://github.com/sonatype","followers_url":"https://api.github.com/users/sonatype/followers","following_url":"https://api.github.com/users/sonatype/following{/other_user}","gists_url":"https://api.github.com/users/sonatype/gists{/gist_id}","starred_url":"https://api.github.com/users/sonatype/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonatype/subscriptions","organizations_url":"https://api.github.com/users/sonatype/orgs","repos_url":"https://api.github.com/users/sonatype/repos","events_url":"https://api.github.com/users/sonatype/events{/privacy}","received_events_url":"https://api.github.com/users/sonatype/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sonatype/nexus-oss","description":"Sonatype Nexus OSS","fork":false,"url":"https://api.github.com/repos/sonatype/nexus-oss","forks_url":"https://api.github.com/repos/sonatype/nexus-oss/forks","keys_url":"https://api.github.com/repos/sonatype/nexus-oss/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonatype/nexus-oss/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonatype/nexus-oss/teams","hooks_url":"https://api.github.com/repos/sonatype/nexus-oss/hooks","issue_events_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/events{/number}","events_url":"https://api.github.com/repos/sonatype/nexus-oss/events","assignees_url":"https://api.github.com/repos/sonatype/nexus-oss/assignees{/user}","branches_url":"https://api.github.com/repos/sonatype/nexus-oss/branches{/branch}","tags_url":"https://api.github.com/repos/sonatype/nexus-oss/tags","blobs_url":"https://api.github.com/repos/sonatype/nexus-oss/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonatype/nexus-oss/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonatype/nexus-oss/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonatype/nexus-oss/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonatype/nexus-oss/statuses/{sha}","languages_url":"https://api.github.com/repos/sonatype/nexus-oss/languages","stargazers_url":"https://api.github.com/repos/sonatype/nexus-oss/stargazers","contributors_url":"https://api.github.com/repos/sonatype/nexus-oss/contributors","subscribers_url":"https://api.github.com/repos/sonatype/nexus-oss/subscribers","subscription_url":"https://api.github.com/repos/sonatype/nexus-oss/subscription","commits_url":"https://api.github.com/repos/sonatype/nexus-oss/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonatype/nexus-oss/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonatype/nexus-oss/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/comments/{number}","contents_url":"https://api.github.com/repos/sonatype/nexus-oss/contents/{+path}","compare_url":"https://api.github.com/repos/sonatype/nexus-oss/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonatype/nexus-oss/merges","archive_url":"https://api.github.com/repos/sonatype/nexus-oss/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonatype/nexus-oss/downloads","issues_url":"https://api.github.com/repos/sonatype/nexus-oss/issues{/number}","pulls_url":"https://api.github.com/repos/sonatype/nexus-oss/pulls{/number}","milestones_url":"https://api.github.com/repos/sonatype/nexus-oss/milestones{/number}","notifications_url":"https://api.github.com/repos/sonatype/nexus-oss/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonatype/nexus-oss/labels{/name}","releases_url":"https://api.github.com/repos/sonatype/nexus-oss/releases{/id}","created_at":"2013-05-18T20:48:57Z","updated_at":"2014-10-21T19:56:05Z","pushed_at":"2014-10-29T20:27:39Z","git_url":"git://github.com/sonatype/nexus-oss.git","ssh_url":"git@github.com:sonatype/nexus-oss.git","clone_url":"https://github.com/sonatype/nexus-oss.git","svn_url":"https://github.com/sonatype/nexus-oss","homepage":"http://links.sonatype.com/products/nexus/oss/home","size":790170,"stargazers_count":107,"watchers_count":107,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":66,"mirror_url":null,"open_issues_count":15,"forks":66,"open_issues":15,"watchers":107,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sonatype/nexus-oss/pulls/834"},"html":{"href":"https://github.com/sonatype/nexus-oss/pull/834"},"issue":{"href":"https://api.github.com/repos/sonatype/nexus-oss/issues/834"},"comments":{"href":"https://api.github.com/repos/sonatype/nexus-oss/issues/834/comments"},"review_comments":{"href":"https://api.github.com/repos/sonatype/nexus-oss/pulls/834/comments"},"review_comment":{"href":"https://api.github.com/repos/sonatype/nexus-oss/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/sonatype/nexus-oss/pulls/834/commits"},"statuses":{"href":"https://api.github.com/repos/sonatype/nexus-oss/statuses/a77edce2cd089dc8924f80959d77ed838d39e0b8"}}}}