{"action":"created","comment":{"url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments/53318549","id":53318549,"diff_hunk":"@@ -99,26 +100,34 @@ object Flamingos2Epics {\n \n }\n \n-object Flamingos2EpicsInitializer {\n+object Flamingos2Epics extends EpicsSystem {\n+  \n   val Log = Logger.getLogger(getClass.getName)\n   val CA_CONFIG_FILE = \"/Flamingos2.xml\"\n+  \n+  // Still using a var and null, but at least now it's hidden. Attempts to access the single instance will\n+  // now result in an Exception with a meaningful message, instead of a NullPointerExecption\n+  private var instanceInternal: Flamingos2Epics = null\n+  lazy val instance: Flamingos2Epics = {\n+    if (instanceInternal == null) {\n+      throw new Exception(\"Attempt to reference Flamingos2Epics single instance before initialization.\")\n+    }\n+    instanceInternal\n+  }","path":"bundle/edu.gemini.seqexec.server/src/main/scala/edu/gemini/seqexec/server/Flamingos2Epics.scala","position":72,"original_position":72,"commit_id":"6ac44dff0c44cc9b4a78e82cbe1fd6a4d7a1a019","original_commit_id":"6ac44dff0c44cc9b4a78e82cbe1fd6a4d7a1a019","user":{"login":"jluhrs","id":7621164,"avatar_url":"https://avatars.githubusercontent.com/u/7621164?v=3","gravatar_id":"","url":"https://api.github.com/users/jluhrs","html_url":"https://github.com/jluhrs","followers_url":"https://api.github.com/users/jluhrs/followers","following_url":"https://api.github.com/users/jluhrs/following{/other_user}","gists_url":"https://api.github.com/users/jluhrs/gists{/gist_id}","starred_url":"https://api.github.com/users/jluhrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jluhrs/subscriptions","organizations_url":"https://api.github.com/users/jluhrs/orgs","repos_url":"https://api.github.com/users/jluhrs/repos","events_url":"https://api.github.com/users/jluhrs/events{/privacy}","received_events_url":"https://api.github.com/users/jluhrs/received_events","type":"User","site_admin":false},"body":"Yes, I should have used an Option. I'll fix it.\r\nThe reason I wanted to treat Flamingos2Epics as a singleton is that it is not allowed to have more than one instance, because that means more than one object will try to control the instrument. But I could create and destroy the single instance on demand.","created_at":"2016-02-18T14:18:13Z","updated_at":"2016-02-18T14:18:13Z","html_url":"https://github.com/gemini-hlsw/ocs/pull/818#discussion_r53318549","pull_request_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/818","_links":{"self":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments/53318549"},"html":{"href":"https://github.com/gemini-hlsw/ocs/pull/818#discussion_r53318549"},"pull_request":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/818"}}},"pull_request":{"url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/818","id":59397551,"html_url":"https://github.com/gemini-hlsw/ocs/pull/818","diff_url":"https://github.com/gemini-hlsw/ocs/pull/818.diff","patch_url":"https://github.com/gemini-hlsw/ocs/pull/818.patch","issue_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/818","number":818,"state":"open","locked":false,"title":"Cleaned sequence commands","user":{"login":"jluhrs","id":7621164,"avatar_url":"https://avatars.githubusercontent.com/u/7621164?v=3","gravatar_id":"","url":"https://api.github.com/users/jluhrs","html_url":"https://github.com/jluhrs","followers_url":"https://api.github.com/users/jluhrs/followers","following_url":"https://api.github.com/users/jluhrs/following{/other_user}","gists_url":"https://api.github.com/users/jluhrs/gists{/gist_id}","starred_url":"https://api.github.com/users/jluhrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jluhrs/subscriptions","organizations_url":"https://api.github.com/users/jluhrs/orgs","repos_url":"https://api.github.com/users/jluhrs/repos","events_url":"https://api.github.com/users/jluhrs/events{/privacy}","received_events_url":"https://api.github.com/users/jluhrs/received_events","type":"User","site_admin":false},"body":"The main goal of this task was to clean the sequence commands. In the initial prototype, commands could only be triggered from the console. The code that implemented the console commands had details that should have been in the sequence command themselves, so I fixed that. Also, I modified some commands to provide an immediate response in case of an error. For example, the method to run a sequence would have returned a Task, that has to be run to know if the sequence could actually be run. But if there was no problem, running that Task would actually run the sequence. So now the command is more like a \"start sequence\", that return a value that tells if the sequence started or there was a problem.\r\n\r\nA secondary issue that I tried to fix is that a previous modification that changed some singletons to be objects exposed an initialization problem.","created_at":"2016-02-15T18:08:50Z","updated_at":"2016-02-18T14:18:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b694f74d2bb4fe59a89e2a20d8800f536ac50bb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/818/commits","review_comments_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/818/comments","review_comment_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/818/comments","statuses_url":"https://api.github.com/repos/gemini-hlsw/ocs/statuses/6ac44dff0c44cc9b4a78e82cbe1fd6a4d7a1a019","head":{"label":"jluhrs:feature/OCSADV-520","ref":"feature/OCSADV-520","sha":"6ac44dff0c44cc9b4a78e82cbe1fd6a4d7a1a019","user":{"login":"jluhrs","id":7621164,"avatar_url":"https://avatars.githubusercontent.com/u/7621164?v=3","gravatar_id":"","url":"https://api.github.com/users/jluhrs","html_url":"https://github.com/jluhrs","followers_url":"https://api.github.com/users/jluhrs/followers","following_url":"https://api.github.com/users/jluhrs/following{/other_user}","gists_url":"https://api.github.com/users/jluhrs/gists{/gist_id}","starred_url":"https://api.github.com/users/jluhrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jluhrs/subscriptions","organizations_url":"https://api.github.com/users/jluhrs/orgs","repos_url":"https://api.github.com/users/jluhrs/repos","events_url":"https://api.github.com/users/jluhrs/events{/privacy}","received_events_url":"https://api.github.com/users/jluhrs/received_events","type":"User","site_admin":false},"repo":{"id":24510249,"name":"ocs","full_name":"jluhrs/ocs","owner":{"login":"jluhrs","id":7621164,"avatar_url":"https://avatars.githubusercontent.com/u/7621164?v=3","gravatar_id":"","url":"https://api.github.com/users/jluhrs","html_url":"https://github.com/jluhrs","followers_url":"https://api.github.com/users/jluhrs/followers","following_url":"https://api.github.com/users/jluhrs/following{/other_user}","gists_url":"https://api.github.com/users/jluhrs/gists{/gist_id}","starred_url":"https://api.github.com/users/jluhrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jluhrs/subscriptions","organizations_url":"https://api.github.com/users/jluhrs/orgs","repos_url":"https://api.github.com/users/jluhrs/repos","events_url":"https://api.github.com/users/jluhrs/events{/privacy}","received_events_url":"https://api.github.com/users/jluhrs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jluhrs/ocs","description":"","fork":true,"url":"https://api.github.com/repos/jluhrs/ocs","forks_url":"https://api.github.com/repos/jluhrs/ocs/forks","keys_url":"https://api.github.com/repos/jluhrs/ocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jluhrs/ocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jluhrs/ocs/teams","hooks_url":"https://api.github.com/repos/jluhrs/ocs/hooks","issue_events_url":"https://api.github.com/repos/jluhrs/ocs/issues/events{/number}","events_url":"https://api.github.com/repos/jluhrs/ocs/events","assignees_url":"https://api.github.com/repos/jluhrs/ocs/assignees{/user}","branches_url":"https://api.github.com/repos/jluhrs/ocs/branches{/branch}","tags_url":"https://api.github.com/repos/jluhrs/ocs/tags","blobs_url":"https://api.github.com/repos/jluhrs/ocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jluhrs/ocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jluhrs/ocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/jluhrs/ocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jluhrs/ocs/statuses/{sha}","languages_url":"https://api.github.com/repos/jluhrs/ocs/languages","stargazers_url":"https://api.github.com/repos/jluhrs/ocs/stargazers","contributors_url":"https://api.github.com/repos/jluhrs/ocs/contributors","subscribers_url":"https://api.github.com/repos/jluhrs/ocs/subscribers","subscription_url":"https://api.github.com/repos/jluhrs/ocs/subscription","commits_url":"https://api.github.com/repos/jluhrs/ocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/jluhrs/ocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/jluhrs/ocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/jluhrs/ocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/jluhrs/ocs/contents/{+path}","compare_url":"https://api.github.com/repos/jluhrs/ocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jluhrs/ocs/merges","archive_url":"https://api.github.com/repos/jluhrs/ocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jluhrs/ocs/downloads","issues_url":"https://api.github.com/repos/jluhrs/ocs/issues{/number}","pulls_url":"https://api.github.com/repos/jluhrs/ocs/pulls{/number}","milestones_url":"https://api.github.com/repos/jluhrs/ocs/milestones{/number}","notifications_url":"https://api.github.com/repos/jluhrs/ocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jluhrs/ocs/labels{/name}","releases_url":"https://api.github.com/repos/jluhrs/ocs/releases{/id}","deployments_url":"https://api.github.com/repos/jluhrs/ocs/deployments","created_at":"2014-09-26T18:14:26Z","updated_at":"2016-01-18T14:44:15Z","pushed_at":"2016-02-17T18:41:12Z","git_url":"git://github.com/jluhrs/ocs.git","ssh_url":"git@github.com:jluhrs/ocs.git","clone_url":"https://github.com/jluhrs/ocs.git","svn_url":"https://github.com/jluhrs/ocs","homepage":null,"size":324017,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"develop"}},"base":{"label":"gemini-hlsw:develop","ref":"develop","sha":"aeaf72b4007c6a5d58cd506a9770695bfad9ed83","user":{"login":"gemini-hlsw","id":8593735,"avatar_url":"https://avatars.githubusercontent.com/u/8593735?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-hlsw","html_url":"https://github.com/gemini-hlsw","followers_url":"https://api.github.com/users/gemini-hlsw/followers","following_url":"https://api.github.com/users/gemini-hlsw/following{/other_user}","gists_url":"https://api.github.com/users/gemini-hlsw/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-hlsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-hlsw/subscriptions","organizations_url":"https://api.github.com/users/gemini-hlsw/orgs","repos_url":"https://api.github.com/users/gemini-hlsw/repos","events_url":"https://api.github.com/users/gemini-hlsw/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-hlsw/received_events","type":"Organization","site_admin":false},"repo":{"id":23963494,"name":"ocs","full_name":"gemini-hlsw/ocs","owner":{"login":"gemini-hlsw","id":8593735,"avatar_url":"https://avatars.githubusercontent.com/u/8593735?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-hlsw","html_url":"https://github.com/gemini-hlsw","followers_url":"https://api.github.com/users/gemini-hlsw/followers","following_url":"https://api.github.com/users/gemini-hlsw/following{/other_user}","gists_url":"https://api.github.com/users/gemini-hlsw/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-hlsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-hlsw/subscriptions","organizations_url":"https://api.github.com/users/gemini-hlsw/orgs","repos_url":"https://api.github.com/users/gemini-hlsw/repos","events_url":"https://api.github.com/users/gemini-hlsw/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-hlsw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gemini-hlsw/ocs","description":"Observatory Control Software","fork":false,"url":"https://api.github.com/repos/gemini-hlsw/ocs","forks_url":"https://api.github.com/repos/gemini-hlsw/ocs/forks","keys_url":"https://api.github.com/repos/gemini-hlsw/ocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemini-hlsw/ocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemini-hlsw/ocs/teams","hooks_url":"https://api.github.com/repos/gemini-hlsw/ocs/hooks","issue_events_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/events{/number}","events_url":"https://api.github.com/repos/gemini-hlsw/ocs/events","assignees_url":"https://api.github.com/repos/gemini-hlsw/ocs/assignees{/user}","branches_url":"https://api.github.com/repos/gemini-hlsw/ocs/branches{/branch}","tags_url":"https://api.github.com/repos/gemini-hlsw/ocs/tags","blobs_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemini-hlsw/ocs/statuses/{sha}","languages_url":"https://api.github.com/repos/gemini-hlsw/ocs/languages","stargazers_url":"https://api.github.com/repos/gemini-hlsw/ocs/stargazers","contributors_url":"https://api.github.com/repos/gemini-hlsw/ocs/contributors","subscribers_url":"https://api.github.com/repos/gemini-hlsw/ocs/subscribers","subscription_url":"https://api.github.com/repos/gemini-hlsw/ocs/subscription","commits_url":"https://api.github.com/repos/gemini-hlsw/ocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemini-hlsw/ocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/gemini-hlsw/ocs/contents/{+path}","compare_url":"https://api.github.com/repos/gemini-hlsw/ocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemini-hlsw/ocs/merges","archive_url":"https://api.github.com/repos/gemini-hlsw/ocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemini-hlsw/ocs/downloads","issues_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues{/number}","pulls_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls{/number}","milestones_url":"https://api.github.com/repos/gemini-hlsw/ocs/milestones{/number}","notifications_url":"https://api.github.com/repos/gemini-hlsw/ocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemini-hlsw/ocs/labels{/name}","releases_url":"https://api.github.com/repos/gemini-hlsw/ocs/releases{/id}","deployments_url":"https://api.github.com/repos/gemini-hlsw/ocs/deployments","created_at":"2014-09-12T14:20:23Z","updated_at":"2016-01-11T14:13:24Z","pushed_at":"2016-02-18T13:57:41Z","git_url":"git://github.com/gemini-hlsw/ocs.git","ssh_url":"git@github.com:gemini-hlsw/ocs.git","clone_url":"https://github.com/gemini-hlsw/ocs.git","svn_url":"https://github.com/gemini-hlsw/ocs","homepage":"","size":347682,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":8,"forks":14,"open_issues":8,"watchers":4,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/818"},"html":{"href":"https://github.com/gemini-hlsw/ocs/pull/818"},"issue":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/issues/818"},"comments":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/issues/818/comments"},"review_comments":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/818/comments"},"review_comment":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/818/commits"},"statuses":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/statuses/6ac44dff0c44cc9b4a78e82cbe1fd6a4d7a1a019"}}}}