{"action":"created","comment":{"url":"https://api.github.com/repos/crate/crate/pulls/comments/50001859","id":50001859,"diff_hunk":"@@ -0,0 +1,65 @@\n+/*\n+ * Licensed to Crate under one or more contributor license agreements.\n+ * See the NOTICE file distributed with this work for additional\n+ * information regarding copyright ownership.  Crate licenses this file\n+ * to you under the Apache License, Version 2.0 (the \"License\"); you may\n+ * not use this file except in compliance with the License.  You may\n+ * obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n+ * implied.  See the License for the specific language governing\n+ * permissions and limitations under the License.\n+ *\n+ * However, if you have executed another commercial license agreement\n+ * with Crate these terms will supersede the license and you may use the\n+ * software solely pursuant to the terms of the relevant commercial\n+ * agreement.\n+ */\n+\n+package org.elasticsearch.bootstrap;\n+\n+import org.elasticsearch.common.SuppressForbidden;\n+\n+public class BootstrapProxy {\n+    public static volatile Bootstrap BOOTSTRAP_PROXY;\n+\n+    public static void stop() {\n+        BOOTSTRAP_PROXY.stop();\n+    }\n+\n+    public static void init(String[] args) throws Throwable {\n+        checkForCustomConfFile();\n+        BOOTSTRAP_PROXY.init(args);\n+    }\n+\n+    @SuppressForbidden(reason = \"System#err\")\n+    private static void sysError(String line, boolean flush) {\n+        System.err.println(line);\n+        if (flush) {\n+            System.err.flush();\n+        }\n+    }\n+\n+    private static void checkForCustomConfFile() {\n+        String confFileSetting = System.getProperty(\"es.default.config\");\n+        checkUnsetAndMaybeExit(confFileSetting, \"es.default.config\");\n+        confFileSetting = System.getProperty(\"es.config\");\n+        checkUnsetAndMaybeExit(confFileSetting, \"es.config\");\n+        confFileSetting = System.getProperty(\"elasticsearch.config\");\n+        checkUnsetAndMaybeExit(confFileSetting, \"elasticsearch.config\");\n+    }\n+\n+    private static void checkUnsetAndMaybeExit(String confFileSetting, String settingName) {\n+        if (confFileSetting != null && confFileSetting.isEmpty() == false) {\n+            sysError(\n+                    String.format(","path":"app/src/main/java/org/elasticsearch/bootstrap/BootstrapProxy.java","position":57,"original_position":59,"commit_id":"7db0cfa9c93b02e7a086c6fbb47825af3d77d15a","original_commit_id":"39d4aa1b1de39d886855bc7a24d40ed4be5fba9c","user":{"login":"mfussenegger","id":38700,"avatar_url":"https://avatars.githubusercontent.com/u/38700?v=3","gravatar_id":"","url":"https://api.github.com/users/mfussenegger","html_url":"https://github.com/mfussenegger","followers_url":"https://api.github.com/users/mfussenegger/followers","following_url":"https://api.github.com/users/mfussenegger/following{/other_user}","gists_url":"https://api.github.com/users/mfussenegger/gists{/gist_id}","starred_url":"https://api.github.com/users/mfussenegger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfussenegger/subscriptions","organizations_url":"https://api.github.com/users/mfussenegger/orgs","repos_url":"https://api.github.com/users/mfussenegger/repos","events_url":"https://api.github.com/users/mfussenegger/events{/privacy}","received_events_url":"https://api.github.com/users/mfussenegger/received_events","type":"User","site_admin":false},"body":"code formatting is a bit odd?","created_at":"2016-01-18T14:09:44Z","updated_at":"2016-01-18T14:09:44Z","html_url":"https://github.com/crate/crate/pull/3182#discussion_r50001859","pull_request_url":"https://api.github.com/repos/crate/crate/pulls/3182","_links":{"self":{"href":"https://api.github.com/repos/crate/crate/pulls/comments/50001859"},"html":{"href":"https://github.com/crate/crate/pull/3182#discussion_r50001859"},"pull_request":{"href":"https://api.github.com/repos/crate/crate/pulls/3182"}}},"pull_request":{"url":"https://api.github.com/repos/crate/crate/pulls/3182","id":56345244,"html_url":"https://github.com/crate/crate/pull/3182","diff_url":"https://github.com/crate/crate/pull/3182.diff","patch_url":"https://github.com/crate/crate/pull/3182.patch","issue_url":"https://api.github.com/repos/crate/crate/issues/3182","number":3182,"state":"open","locked":false,"title":"adapted app module to ES 2.1","user":{"login":"adrpar","id":1805742,"avatar_url":"https://avatars.githubusercontent.com/u/1805742?v=3","gravatar_id":"","url":"https://api.github.com/users/adrpar","html_url":"https://github.com/adrpar","followers_url":"https://api.github.com/users/adrpar/followers","following_url":"https://api.github.com/users/adrpar/following{/other_user}","gists_url":"https://api.github.com/users/adrpar/gists{/gist_id}","starred_url":"https://api.github.com/users/adrpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrpar/subscriptions","organizations_url":"https://api.github.com/users/adrpar/orgs","repos_url":"https://api.github.com/users/adrpar/repos","events_url":"https://api.github.com/users/adrpar/events{/privacy}","received_events_url":"https://api.github.com/users/adrpar/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-18T13:57:55Z","updated_at":"2016-01-18T14:09:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd06335f4d8d5e3f87f72ad260a016119b40f79f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crate/crate/pulls/3182/commits","review_comments_url":"https://api.github.com/repos/crate/crate/pulls/3182/comments","review_comment_url":"https://api.github.com/repos/crate/crate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crate/crate/issues/3182/comments","statuses_url":"https://api.github.com/repos/crate/crate/statuses/7db0cfa9c93b02e7a086c6fbb47825af3d77d15a","head":{"label":"crate:a/es_21_app_module","ref":"a/es_21_app_module","sha":"7db0cfa9c93b02e7a086c6fbb47825af3d77d15a","user":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"repo":{"id":9342529,"name":"crate","full_name":"crate/crate","owner":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crate/crate","description":"Crate.IO: The fast, scalable, easy to use SQL database with native full text search","fork":false,"url":"https://api.github.com/repos/crate/crate","forks_url":"https://api.github.com/repos/crate/crate/forks","keys_url":"https://api.github.com/repos/crate/crate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crate/crate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crate/crate/teams","hooks_url":"https://api.github.com/repos/crate/crate/hooks","issue_events_url":"https://api.github.com/repos/crate/crate/issues/events{/number}","events_url":"https://api.github.com/repos/crate/crate/events","assignees_url":"https://api.github.com/repos/crate/crate/assignees{/user}","branches_url":"https://api.github.com/repos/crate/crate/branches{/branch}","tags_url":"https://api.github.com/repos/crate/crate/tags","blobs_url":"https://api.github.com/repos/crate/crate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crate/crate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crate/crate/git/refs{/sha}","trees_url":"https://api.github.com/repos/crate/crate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crate/crate/statuses/{sha}","languages_url":"https://api.github.com/repos/crate/crate/languages","stargazers_url":"https://api.github.com/repos/crate/crate/stargazers","contributors_url":"https://api.github.com/repos/crate/crate/contributors","subscribers_url":"https://api.github.com/repos/crate/crate/subscribers","subscription_url":"https://api.github.com/repos/crate/crate/subscription","commits_url":"https://api.github.com/repos/crate/crate/commits{/sha}","git_commits_url":"https://api.github.com/repos/crate/crate/git/commits{/sha}","comments_url":"https://api.github.com/repos/crate/crate/comments{/number}","issue_comment_url":"https://api.github.com/repos/crate/crate/issues/comments{/number}","contents_url":"https://api.github.com/repos/crate/crate/contents/{+path}","compare_url":"https://api.github.com/repos/crate/crate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crate/crate/merges","archive_url":"https://api.github.com/repos/crate/crate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crate/crate/downloads","issues_url":"https://api.github.com/repos/crate/crate/issues{/number}","pulls_url":"https://api.github.com/repos/crate/crate/pulls{/number}","milestones_url":"https://api.github.com/repos/crate/crate/milestones{/number}","notifications_url":"https://api.github.com/repos/crate/crate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crate/crate/labels{/name}","releases_url":"https://api.github.com/repos/crate/crate/releases{/id}","created_at":"2013-04-10T09:17:16Z","updated_at":"2016-01-17T16:06:47Z","pushed_at":"2016-01-18T14:07:18Z","git_url":"git://github.com/crate/crate.git","ssh_url":"git@github.com:crate/crate.git","clone_url":"https://github.com/crate/crate.git","svn_url":"https://github.com/crate/crate","homepage":"https://crate.io","size":59921,"stargazers_count":1115,"watchers_count":1115,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":130,"mirror_url":null,"open_issues_count":44,"forks":130,"open_issues":44,"watchers":1115,"default_branch":"master"}},"base":{"label":"crate:es-2.1","ref":"es-2.1","sha":"f38002712a47b40c3b6831f676902f0eaa05ae7e","user":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"repo":{"id":9342529,"name":"crate","full_name":"crate/crate","owner":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crate/crate","description":"Crate.IO: The fast, scalable, easy to use SQL database with native full text search","fork":false,"url":"https://api.github.com/repos/crate/crate","forks_url":"https://api.github.com/repos/crate/crate/forks","keys_url":"https://api.github.com/repos/crate/crate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crate/crate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crate/crate/teams","hooks_url":"https://api.github.com/repos/crate/crate/hooks","issue_events_url":"https://api.github.com/repos/crate/crate/issues/events{/number}","events_url":"https://api.github.com/repos/crate/crate/events","assignees_url":"https://api.github.com/repos/crate/crate/assignees{/user}","branches_url":"https://api.github.com/repos/crate/crate/branches{/branch}","tags_url":"https://api.github.com/repos/crate/crate/tags","blobs_url":"https://api.github.com/repos/crate/crate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crate/crate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crate/crate/git/refs{/sha}","trees_url":"https://api.github.com/repos/crate/crate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crate/crate/statuses/{sha}","languages_url":"https://api.github.com/repos/crate/crate/languages","stargazers_url":"https://api.github.com/repos/crate/crate/stargazers","contributors_url":"https://api.github.com/repos/crate/crate/contributors","subscribers_url":"https://api.github.com/repos/crate/crate/subscribers","subscription_url":"https://api.github.com/repos/crate/crate/subscription","commits_url":"https://api.github.com/repos/crate/crate/commits{/sha}","git_commits_url":"https://api.github.com/repos/crate/crate/git/commits{/sha}","comments_url":"https://api.github.com/repos/crate/crate/comments{/number}","issue_comment_url":"https://api.github.com/repos/crate/crate/issues/comments{/number}","contents_url":"https://api.github.com/repos/crate/crate/contents/{+path}","compare_url":"https://api.github.com/repos/crate/crate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crate/crate/merges","archive_url":"https://api.github.com/repos/crate/crate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crate/crate/downloads","issues_url":"https://api.github.com/repos/crate/crate/issues{/number}","pulls_url":"https://api.github.com/repos/crate/crate/pulls{/number}","milestones_url":"https://api.github.com/repos/crate/crate/milestones{/number}","notifications_url":"https://api.github.com/repos/crate/crate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crate/crate/labels{/name}","releases_url":"https://api.github.com/repos/crate/crate/releases{/id}","created_at":"2013-04-10T09:17:16Z","updated_at":"2016-01-17T16:06:47Z","pushed_at":"2016-01-18T14:07:18Z","git_url":"git://github.com/crate/crate.git","ssh_url":"git@github.com:crate/crate.git","clone_url":"https://github.com/crate/crate.git","svn_url":"https://github.com/crate/crate","homepage":"https://crate.io","size":59921,"stargazers_count":1115,"watchers_count":1115,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":130,"mirror_url":null,"open_issues_count":44,"forks":130,"open_issues":44,"watchers":1115,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crate/crate/pulls/3182"},"html":{"href":"https://github.com/crate/crate/pull/3182"},"issue":{"href":"https://api.github.com/repos/crate/crate/issues/3182"},"comments":{"href":"https://api.github.com/repos/crate/crate/issues/3182/comments"},"review_comments":{"href":"https://api.github.com/repos/crate/crate/pulls/3182/comments"},"review_comment":{"href":"https://api.github.com/repos/crate/crate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crate/crate/pulls/3182/commits"},"statuses":{"href":"https://api.github.com/repos/crate/crate/statuses/7db0cfa9c93b02e7a086c6fbb47825af3d77d15a"}}}}