{"action":"created","issue":{"url":"https://api.github.com/repos/sonatype/nexus-oss/issues/1390","labels_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/1390/labels{/name}","comments_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/1390/comments","events_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/1390/events","html_url":"https://github.com/sonatype/nexus-oss/pull/1390","id":84065559,"number":1390,"title":"Install StateGuardModule as early as possible in the startup sequence.","user":{"login":"mcculls","id":145851,"avatar_url":"https://avatars.githubusercontent.com/u/145851?v=3","gravatar_id":"","url":"https://api.github.com/users/mcculls","html_url":"https://github.com/mcculls","followers_url":"https://api.github.com/users/mcculls/followers","following_url":"https://api.github.com/users/mcculls/following{/other_user}","gists_url":"https://api.github.com/users/mcculls/gists{/gist_id}","starred_url":"https://api.github.com/users/mcculls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcculls/subscriptions","organizations_url":"https://api.github.com/users/mcculls/orgs","repos_url":"https://api.github.com/users/mcculls/repos","events_url":"https://api.github.com/users/mcculls/events{/privacy}","received_events_url":"https://api.github.com/users/mcculls/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sonatype/nexus-oss/labels/review","name":"review","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-02T15:09:48Z","updated_at":"2015-06-02T18:36:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sonatype/nexus-oss/pulls/1390","html_url":"https://github.com/sonatype/nexus-oss/pull/1390","diff_url":"https://github.com/sonatype/nexus-oss/pull/1390.diff","patch_url":"https://github.com/sonatype/nexus-oss/pull/1390.patch"},"body":"http://bamboo.s/browse/NX3-OSSF386-2 :white_check_mark: \r\n\r\nNow that nexus-core depends on nexus-repository (and therefore nexus-repository will be processed before nexus-core) it makes more sense to install the StateGuardModule in the root context module instead of waiting until nexus-core is activated, potentially missing out on enhancing prior components. This revealed an incorrect assumption in StorageFacetImpl that hooks would be registered when the facet was in NEW state. Since these hooks are registered by other facets after StorageFacetImpl has been initialised it should instead be checking for INITIALISED state (and use the state constants from FacetSupport).\r\n\r\nAlso uninstalled the search hook when the search facet is destroyed - otherwise the storage facet could call it when destroying the registry content, even though this is not necessary since the index is gone."},"comment":{"url":"https://api.github.com/repos/sonatype/nexus-oss/issues/comments/108047654","html_url":"https://github.com/sonatype/nexus-oss/pull/1390#issuecomment-108047654","issue_url":"https://api.github.com/repos/sonatype/nexus-oss/issues/1390","id":108047654,"user":{"login":"jdillon","id":20114,"avatar_url":"https://avatars.githubusercontent.com/u/20114?v=3","gravatar_id":"","url":"https://api.github.com/users/jdillon","html_url":"https://github.com/jdillon","followers_url":"https://api.github.com/users/jdillon/followers","following_url":"https://api.github.com/users/jdillon/following{/other_user}","gists_url":"https://api.github.com/users/jdillon/gists{/gist_id}","starred_url":"https://api.github.com/users/jdillon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdillon/subscriptions","organizations_url":"https://api.github.com/users/jdillon/orgs","repos_url":"https://api.github.com/users/jdillon/repos","events_url":"https://api.github.com/users/jdillon/events{/privacy}","received_events_url":"https://api.github.com/users/jdillon/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T18:36:28Z","updated_at":"2015-06-02T18:36:28Z","body":"+1"}}