{"action":"created","comment":{"url":"https://api.github.com/repos/wildfly/wildfly/pulls/comments/22789162","id":22789162,"diff_hunk":"@@ -0,0 +1,73 @@\n+/*\n+ * To change this license header, choose License Headers in Project Properties.\n+ * To change this template file, choose Tools | Templates\n+ * and open the template in the editor.\n+ */\n+package org.jboss.as.controller.operations.global;\n+\n+import java.util.Locale;\n+\n+/**\n+ * Utility class handling low-level parsing of Locale string tag.\n+ *\n+ * @author Romain Pelisse - <romain@redhat.com>\n+ */\n+public final class LocaleResolver {\n+\n+    private static final String ENGLISH = new Locale(\"en\").getLanguage();\n+\n+    private LocaleResolver(){};\n+\n+    static Locale resolveLocale(String unparsed) throws IllegalArgumentException {\n+        int len = unparsed.length();\n+        if ( len < 1 || len > 7 ) {","path":"controller/src/main/java/org/jboss/as/controller/operations/global/LocaleResolver.java","position":23,"original_position":23,"commit_id":"03944af4352ce1482967a9b384edfd8f8df5da22","original_commit_id":"03944af4352ce1482967a9b384edfd8f8df5da22","user":{"login":"rpelisse","id":117836,"avatar_url":"https://avatars.githubusercontent.com/u/117836?v=3","gravatar_id":"","url":"https://api.github.com/users/rpelisse","html_url":"https://github.com/rpelisse","followers_url":"https://api.github.com/users/rpelisse/followers","following_url":"https://api.github.com/users/rpelisse/following{/other_user}","gists_url":"https://api.github.com/users/rpelisse/gists{/gist_id}","starred_url":"https://api.github.com/users/rpelisse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpelisse/subscriptions","organizations_url":"https://api.github.com/users/rpelisse/orgs","repos_url":"https://api.github.com/users/rpelisse/repos","events_url":"https://api.github.com/users/rpelisse/events{/privacy}","received_events_url":"https://api.github.com/users/rpelisse/received_events","type":"User","site_admin":false},"body":"Regarding you previous 3 comments:\r\n\r\n1) Yes, a PR for -wildfly-core is the next step. I first fixed the issue in EAP, as there was too much code changes since then to simply apply on Wildfy 9, I opted to have this first reviewed and applied on 8.2.x.\r\n\r\n2) Right, would be nice to support , I've file a [WFLY-4239](https://issues.jboss.org/browse/WFLY-4239) about this, and will try to work on it with this fix.\r\n\r\n3) Nice sum up, assuming you don't feel disowned of your IP, I'll use part it to the code comment :) ","created_at":"2015-01-12T13:24:11Z","updated_at":"2015-01-12T13:24:11Z","html_url":"https://github.com/wildfly/wildfly/pull/7078#discussion_r22789162","pull_request_url":"https://api.github.com/repos/wildfly/wildfly/pulls/7078","_links":{"self":{"href":"https://api.github.com/repos/wildfly/wildfly/pulls/comments/22789162"},"html":{"href":"https://github.com/wildfly/wildfly/pull/7078#discussion_r22789162"},"pull_request":{"href":"https://api.github.com/repos/wildfly/wildfly/pulls/7078"}}},"pull_request":{"url":"https://api.github.com/repos/wildfly/wildfly/pulls/7078","id":26985151,"html_url":"https://github.com/wildfly/wildfly/pull/7078","diff_url":"https://github.com/wildfly/wildfly/pull/7078.diff","patch_url":"https://github.com/wildfly/wildfly/pull/7078.patch","issue_url":"https://api.github.com/repos/wildfly/wildfly/issues/7078","number":7078,"state":"closed","locked":false,"title":"WFLY-3723: setting the local to english in CLI commands on non-english systems does not produce english output ","user":{"login":"rpelisse","id":117836,"avatar_url":"https://avatars.githubusercontent.com/u/117836?v=3","gravatar_id":"","url":"https://api.github.com/users/rpelisse","html_url":"https://github.com/rpelisse","followers_url":"https://api.github.com/users/rpelisse/followers","following_url":"https://api.github.com/users/rpelisse/following{/other_user}","gists_url":"https://api.github.com/users/rpelisse/gists{/gist_id}","starred_url":"https://api.github.com/users/rpelisse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpelisse/subscriptions","organizations_url":"https://api.github.com/users/rpelisse/orgs","repos_url":"https://api.github.com/users/rpelisse/repos","events_url":"https://api.github.com/users/rpelisse/events{/privacy}","received_events_url":"https://api.github.com/users/rpelisse/received_events","type":"User","site_admin":false},"body":"Also,\r\n- add extra test to ensure provided locale tag string is neither too small or too big\r\n- code cleanup to allow unit test\r\n- create a protected static method implementing the desired Locale resolution, but separated from Wildfly data model\r\n- methods throw exception to be catched by wfly specific code, which handle proper logging/display of format error\r\n- this ultimately allowed to add test case to ensure LocaleResolution behave as desired\r\n- cleanup, extract Locale, low-level parsing to separate utility class","created_at":"2015-01-07T20:28:52Z","updated_at":"2015-01-12T13:24:11Z","closed_at":"2015-01-09T16:07:49Z","merged_at":null,"merge_commit_sha":"73db37afcf051b2e97af43f3c9cd8753d2eee551","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wildfly/wildfly/pulls/7078/commits","review_comments_url":"https://api.github.com/repos/wildfly/wildfly/pulls/7078/comments","review_comment_url":"https://api.github.com/repos/wildfly/wildfly/pulls/comments/{number}","comments_url":"https://api.github.com/repos/wildfly/wildfly/issues/7078/comments","statuses_url":"https://api.github.com/repos/wildfly/wildfly/statuses/03944af4352ce1482967a9b384edfd8f8df5da22","head":{"label":"rpelisse:WFLY-3723","ref":"WFLY-3723","sha":"03944af4352ce1482967a9b384edfd8f8df5da22","user":{"login":"rpelisse","id":117836,"avatar_url":"https://avatars.githubusercontent.com/u/117836?v=3","gravatar_id":"","url":"https://api.github.com/users/rpelisse","html_url":"https://github.com/rpelisse","followers_url":"https://api.github.com/users/rpelisse/followers","following_url":"https://api.github.com/users/rpelisse/following{/other_user}","gists_url":"https://api.github.com/users/rpelisse/gists{/gist_id}","starred_url":"https://api.github.com/users/rpelisse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpelisse/subscriptions","organizations_url":"https://api.github.com/users/rpelisse/orgs","repos_url":"https://api.github.com/users/rpelisse/repos","events_url":"https://api.github.com/users/rpelisse/events{/privacy}","received_events_url":"https://api.github.com/users/rpelisse/received_events","type":"User","site_admin":false},"repo":{"id":28923572,"name":"wildfly","full_name":"rpelisse/wildfly","owner":{"login":"rpelisse","id":117836,"avatar_url":"https://avatars.githubusercontent.com/u/117836?v=3","gravatar_id":"","url":"https://api.github.com/users/rpelisse","html_url":"https://github.com/rpelisse","followers_url":"https://api.github.com/users/rpelisse/followers","following_url":"https://api.github.com/users/rpelisse/following{/other_user}","gists_url":"https://api.github.com/users/rpelisse/gists{/gist_id}","starred_url":"https://api.github.com/users/rpelisse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpelisse/subscriptions","organizations_url":"https://api.github.com/users/rpelisse/orgs","repos_url":"https://api.github.com/users/rpelisse/repos","events_url":"https://api.github.com/users/rpelisse/events{/privacy}","received_events_url":"https://api.github.com/users/rpelisse/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rpelisse/wildfly","description":"WildFly Application Server","fork":true,"url":"https://api.github.com/repos/rpelisse/wildfly","forks_url":"https://api.github.com/repos/rpelisse/wildfly/forks","keys_url":"https://api.github.com/repos/rpelisse/wildfly/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rpelisse/wildfly/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rpelisse/wildfly/teams","hooks_url":"https://api.github.com/repos/rpelisse/wildfly/hooks","issue_events_url":"https://api.github.com/repos/rpelisse/wildfly/issues/events{/number}","events_url":"https://api.github.com/repos/rpelisse/wildfly/events","assignees_url":"https://api.github.com/repos/rpelisse/wildfly/assignees{/user}","branches_url":"https://api.github.com/repos/rpelisse/wildfly/branches{/branch}","tags_url":"https://api.github.com/repos/rpelisse/wildfly/tags","blobs_url":"https://api.github.com/repos/rpelisse/wildfly/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rpelisse/wildfly/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rpelisse/wildfly/git/refs{/sha}","trees_url":"https://api.github.com/repos/rpelisse/wildfly/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rpelisse/wildfly/statuses/{sha}","languages_url":"https://api.github.com/repos/rpelisse/wildfly/languages","stargazers_url":"https://api.github.com/repos/rpelisse/wildfly/stargazers","contributors_url":"https://api.github.com/repos/rpelisse/wildfly/contributors","subscribers_url":"https://api.github.com/repos/rpelisse/wildfly/subscribers","subscription_url":"https://api.github.com/repos/rpelisse/wildfly/subscription","commits_url":"https://api.github.com/repos/rpelisse/wildfly/commits{/sha}","git_commits_url":"https://api.github.com/repos/rpelisse/wildfly/git/commits{/sha}","comments_url":"https://api.github.com/repos/rpelisse/wildfly/comments{/number}","issue_comment_url":"https://api.github.com/repos/rpelisse/wildfly/issues/comments/{number}","contents_url":"https://api.github.com/repos/rpelisse/wildfly/contents/{+path}","compare_url":"https://api.github.com/repos/rpelisse/wildfly/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rpelisse/wildfly/merges","archive_url":"https://api.github.com/repos/rpelisse/wildfly/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rpelisse/wildfly/downloads","issues_url":"https://api.github.com/repos/rpelisse/wildfly/issues{/number}","pulls_url":"https://api.github.com/repos/rpelisse/wildfly/pulls{/number}","milestones_url":"https://api.github.com/repos/rpelisse/wildfly/milestones{/number}","notifications_url":"https://api.github.com/repos/rpelisse/wildfly/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rpelisse/wildfly/labels{/name}","releases_url":"https://api.github.com/repos/rpelisse/wildfly/releases{/id}","created_at":"2015-01-07T16:44:50Z","updated_at":"2015-01-07T16:45:14Z","pushed_at":"2015-01-09T16:13:22Z","git_url":"git://github.com/rpelisse/wildfly.git","ssh_url":"git@github.com:rpelisse/wildfly.git","clone_url":"https://github.com/rpelisse/wildfly.git","svn_url":"https://github.com/rpelisse/wildfly","homepage":"http://wildfly.org","size":131857,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wildfly:8.x","ref":"8.x","sha":"cad226d05a0ac1edaca2d36f805abf70c1c44852","user":{"login":"wildfly","id":3066274,"avatar_url":"https://avatars.githubusercontent.com/u/3066274?v=3","gravatar_id":"","url":"https://api.github.com/users/wildfly","html_url":"https://github.com/wildfly","followers_url":"https://api.github.com/users/wildfly/followers","following_url":"https://api.github.com/users/wildfly/following{/other_user}","gists_url":"https://api.github.com/users/wildfly/gists{/gist_id}","starred_url":"https://api.github.com/users/wildfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wildfly/subscriptions","organizations_url":"https://api.github.com/users/wildfly/orgs","repos_url":"https://api.github.com/users/wildfly/repos","events_url":"https://api.github.com/users/wildfly/events{/privacy}","received_events_url":"https://api.github.com/users/wildfly/received_events","type":"Organization","site_admin":false},"repo":{"id":764708,"name":"wildfly","full_name":"wildfly/wildfly","owner":{"login":"wildfly","id":3066274,"avatar_url":"https://avatars.githubusercontent.com/u/3066274?v=3","gravatar_id":"","url":"https://api.github.com/users/wildfly","html_url":"https://github.com/wildfly","followers_url":"https://api.github.com/users/wildfly/followers","following_url":"https://api.github.com/users/wildfly/following{/other_user}","gists_url":"https://api.github.com/users/wildfly/gists{/gist_id}","starred_url":"https://api.github.com/users/wildfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wildfly/subscriptions","organizations_url":"https://api.github.com/users/wildfly/orgs","repos_url":"https://api.github.com/users/wildfly/repos","events_url":"https://api.github.com/users/wildfly/events{/privacy}","received_events_url":"https://api.github.com/users/wildfly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wildfly/wildfly","description":"WildFly Application Server","fork":false,"url":"https://api.github.com/repos/wildfly/wildfly","forks_url":"https://api.github.com/repos/wildfly/wildfly/forks","keys_url":"https://api.github.com/repos/wildfly/wildfly/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wildfly/wildfly/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wildfly/wildfly/teams","hooks_url":"https://api.github.com/repos/wildfly/wildfly/hooks","issue_events_url":"https://api.github.com/repos/wildfly/wildfly/issues/events{/number}","events_url":"https://api.github.com/repos/wildfly/wildfly/events","assignees_url":"https://api.github.com/repos/wildfly/wildfly/assignees{/user}","branches_url":"https://api.github.com/repos/wildfly/wildfly/branches{/branch}","tags_url":"https://api.github.com/repos/wildfly/wildfly/tags","blobs_url":"https://api.github.com/repos/wildfly/wildfly/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wildfly/wildfly/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wildfly/wildfly/git/refs{/sha}","trees_url":"https://api.github.com/repos/wildfly/wildfly/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wildfly/wildfly/statuses/{sha}","languages_url":"https://api.github.com/repos/wildfly/wildfly/languages","stargazers_url":"https://api.github.com/repos/wildfly/wildfly/stargazers","contributors_url":"https://api.github.com/repos/wildfly/wildfly/contributors","subscribers_url":"https://api.github.com/repos/wildfly/wildfly/subscribers","subscription_url":"https://api.github.com/repos/wildfly/wildfly/subscription","commits_url":"https://api.github.com/repos/wildfly/wildfly/commits{/sha}","git_commits_url":"https://api.github.com/repos/wildfly/wildfly/git/commits{/sha}","comments_url":"https://api.github.com/repos/wildfly/wildfly/comments{/number}","issue_comment_url":"https://api.github.com/repos/wildfly/wildfly/issues/comments/{number}","contents_url":"https://api.github.com/repos/wildfly/wildfly/contents/{+path}","compare_url":"https://api.github.com/repos/wildfly/wildfly/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wildfly/wildfly/merges","archive_url":"https://api.github.com/repos/wildfly/wildfly/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wildfly/wildfly/downloads","issues_url":"https://api.github.com/repos/wildfly/wildfly/issues{/number}","pulls_url":"https://api.github.com/repos/wildfly/wildfly/pulls{/number}","milestones_url":"https://api.github.com/repos/wildfly/wildfly/milestones{/number}","notifications_url":"https://api.github.com/repos/wildfly/wildfly/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wildfly/wildfly/labels{/name}","releases_url":"https://api.github.com/repos/wildfly/wildfly/releases{/id}","created_at":"2010-07-08T20:46:07Z","updated_at":"2015-01-12T03:15:01Z","pushed_at":"2015-01-12T03:14:59Z","git_url":"git://github.com/wildfly/wildfly.git","ssh_url":"git@github.com:wildfly/wildfly.git","clone_url":"https://github.com/wildfly/wildfly.git","svn_url":"https://github.com/wildfly/wildfly","homepage":"http://wildfly.org","size":273302,"stargazers_count":1286,"watchers_count":1286,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1260,"mirror_url":null,"open_issues_count":28,"forks":1260,"open_issues":28,"watchers":1286,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wildfly/wildfly/pulls/7078"},"html":{"href":"https://github.com/wildfly/wildfly/pull/7078"},"issue":{"href":"https://api.github.com/repos/wildfly/wildfly/issues/7078"},"comments":{"href":"https://api.github.com/repos/wildfly/wildfly/issues/7078/comments"},"review_comments":{"href":"https://api.github.com/repos/wildfly/wildfly/pulls/7078/comments"},"review_comment":{"href":"https://api.github.com/repos/wildfly/wildfly/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/wildfly/wildfly/pulls/7078/commits"},"statuses":{"href":"https://api.github.com/repos/wildfly/wildfly/statuses/03944af4352ce1482967a9b384edfd8f8df5da22"}}}}