{"action":"created","comment":{"url":"https://api.github.com/repos/openwide-java/owsi-core-parent/pulls/comments/46398625","id":46398625,"diff_hunk":"@@ -0,0 +1,54 @@\n+package fr.openwide.core.commons.util.functional.converter;\n+\n+import java.util.HashSet;\n+import java.util.Set;\n+\n+import org.apache.commons.lang3.StringUtils;\n+\n+import com.google.common.base.Converter;\n+\n+public class StringBooleanConverter extends Converter<String, Boolean> {\n+\n+\tprivate static final StringBooleanConverter INSTANCE = new StringBooleanConverter();\n+\n+\tprivate static final Set<String> trueValues = new HashSet<String>(4);\n+\n+\tprivate static final Set<String> falseValues = new HashSet<String>(4);\n+\n+\tstatic {\n+\t\ttrueValues.add(\"true\");\n+\t\ttrueValues.add(\"on\");\n+\t\ttrueValues.add(\"yes\");\n+\t\ttrueValues.add(\"1\");\n+\n+\t\tfalseValues.add(\"false\");\n+\t\tfalseValues.add(\"off\");\n+\t\tfalseValues.add(\"no\");\n+\t\tfalseValues.add(\"0\");\n+\t}\n+\n+\tpublic static StringBooleanConverter get() {\n+\t\treturn INSTANCE;\n+\t}\n+\n+\tprotected StringBooleanConverter() {\n+\t}\n+\n+\t@Override\n+\tprotected Boolean doForward(String a) {\n+\t\tString value = StringUtils.lowerCase(StringUtils.trim(a));\n+\t\tif (trueValues.contains(value)) {\n+\t\t\treturn Boolean.TRUE;\n+\t\t} else if (falseValues.contains(value)) {\n+\t\t\treturn Boolean.FALSE;\n+\t\t} else {\n+\t\t\tthrow new IllegalArgumentException(\"Invalid boolean value '\" + a + \"'\");\n+\t\t}\n+\t}\n+\n+\t@Override\n+\tprotected String doBackward(Boolean b) {\n+\t\treturn b.toString();","path":"owsi-core/owsi-core-components/owsi-core-component-commons/src/main/java/fr/openwide/core/commons/util/functional/converter/StringBooleanConverter.java","position":51,"original_position":51,"commit_id":"7a60a433e44106180c79c925e20c89f517b31a2d","original_commit_id":"7a60a433e44106180c79c925e20c89f517b31a2d","user":{"login":"gsmet","id":1279749,"avatar_url":"https://avatars.githubusercontent.com/u/1279749?v=3","gravatar_id":"","url":"https://api.github.com/users/gsmet","html_url":"https://github.com/gsmet","followers_url":"https://api.github.com/users/gsmet/followers","following_url":"https://api.github.com/users/gsmet/following{/other_user}","gists_url":"https://api.github.com/users/gsmet/gists{/gist_id}","starred_url":"https://api.github.com/users/gsmet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsmet/subscriptions","organizations_url":"https://api.github.com/users/gsmet/orgs","repos_url":"https://api.github.com/users/gsmet/repos","events_url":"https://api.github.com/users/gsmet/events{/privacy}","received_events_url":"https://api.github.com/users/gsmet/received_events","type":"User","site_admin":false},"body":"if it's a big *B*oolean, it might be null","created_at":"2015-12-02T10:32:39Z","updated_at":"2015-12-02T10:32:39Z","html_url":"https://github.com/openwide-java/owsi-core-parent/pull/4#discussion_r46398625","pull_request_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/openwide-java/owsi-core-parent/pulls/comments/46398625"},"html":{"href":"https://github.com/openwide-java/owsi-core-parent/pull/4#discussion_r46398625"},"pull_request":{"href":"https://api.github.com/repos/openwide-java/owsi-core-parent/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/openwide-java/owsi-core-parent/pulls/4","id":52375816,"html_url":"https://github.com/openwide-java/owsi-core-parent/pull/4","diff_url":"https://github.com/openwide-java/owsi-core-parent/pull/4.diff","patch_url":"https://github.com/openwide-java/owsi-core-parent/pull/4.patch","issue_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/issues/4","number":4,"state":"open","locked":false,"title":"Adding Property object","user":{"login":"florianlacreuse","id":10129873,"avatar_url":"https://avatars.githubusercontent.com/u/10129873?v=3","gravatar_id":"","url":"https://api.github.com/users/florianlacreuse","html_url":"https://github.com/florianlacreuse","followers_url":"https://api.github.com/users/florianlacreuse/followers","following_url":"https://api.github.com/users/florianlacreuse/following{/other_user}","gists_url":"https://api.github.com/users/florianlacreuse/gists{/gist_id}","starred_url":"https://api.github.com/users/florianlacreuse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florianlacreuse/subscriptions","organizations_url":"https://api.github.com/users/florianlacreuse/orgs","repos_url":"https://api.github.com/users/florianlacreuse/repos","events_url":"https://api.github.com/users/florianlacreuse/events{/privacy}","received_events_url":"https://api.github.com/users/florianlacreuse/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-02T10:11:58Z","updated_at":"2015-12-02T10:32:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f8670f2082b4cd38ae2832c9c7f95db4bc6fce24","assignee":{"login":"fenrhil","id":412878,"avatar_url":"https://avatars.githubusercontent.com/u/412878?v=3","gravatar_id":"","url":"https://api.github.com/users/fenrhil","html_url":"https://github.com/fenrhil","followers_url":"https://api.github.com/users/fenrhil/followers","following_url":"https://api.github.com/users/fenrhil/following{/other_user}","gists_url":"https://api.github.com/users/fenrhil/gists{/gist_id}","starred_url":"https://api.github.com/users/fenrhil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fenrhil/subscriptions","organizations_url":"https://api.github.com/users/fenrhil/orgs","repos_url":"https://api.github.com/users/fenrhil/repos","events_url":"https://api.github.com/users/fenrhil/events{/privacy}","received_events_url":"https://api.github.com/users/fenrhil/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/pulls/4/commits","review_comments_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/pulls/4/comments","review_comment_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/issues/4/comments","statuses_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/statuses/7a60a433e44106180c79c925e20c89f517b31a2d","head":{"label":"openwide-java:owsi-core-0.9-MAINTENANCE-property","ref":"owsi-core-0.9-MAINTENANCE-property","sha":"7a60a433e44106180c79c925e20c89f517b31a2d","user":{"login":"openwide-java","id":1385131,"avatar_url":"https://avatars.githubusercontent.com/u/1385131?v=3","gravatar_id":"","url":"https://api.github.com/users/openwide-java","html_url":"https://github.com/openwide-java","followers_url":"https://api.github.com/users/openwide-java/followers","following_url":"https://api.github.com/users/openwide-java/following{/other_user}","gists_url":"https://api.github.com/users/openwide-java/gists{/gist_id}","starred_url":"https://api.github.com/users/openwide-java/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openwide-java/subscriptions","organizations_url":"https://api.github.com/users/openwide-java/orgs","repos_url":"https://api.github.com/users/openwide-java/repos","events_url":"https://api.github.com/users/openwide-java/events{/privacy}","received_events_url":"https://api.github.com/users/openwide-java/received_events","type":"Organization","site_admin":false},"repo":{"id":42950514,"name":"owsi-core-parent","full_name":"openwide-java/owsi-core-parent","owner":{"login":"openwide-java","id":1385131,"avatar_url":"https://avatars.githubusercontent.com/u/1385131?v=3","gravatar_id":"","url":"https://api.github.com/users/openwide-java","html_url":"https://github.com/openwide-java","followers_url":"https://api.github.com/users/openwide-java/followers","following_url":"https://api.github.com/users/openwide-java/following{/other_user}","gists_url":"https://api.github.com/users/openwide-java/gists{/gist_id}","starred_url":"https://api.github.com/users/openwide-java/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openwide-java/subscriptions","organizations_url":"https://api.github.com/users/openwide-java/orgs","repos_url":"https://api.github.com/users/openwide-java/repos","events_url":"https://api.github.com/users/openwide-java/events{/privacy}","received_events_url":"https://api.github.com/users/openwide-java/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openwide-java/owsi-core-parent","description":"Our Core framework based on Spring, Hibernate and Wicket","fork":false,"url":"https://api.github.com/repos/openwide-java/owsi-core-parent","forks_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/forks","keys_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/teams","hooks_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/hooks","issue_events_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/issues/events{/number}","events_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/events","assignees_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/assignees{/user}","branches_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/branches{/branch}","tags_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/tags","blobs_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/git/refs{/sha}","trees_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/statuses/{sha}","languages_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/languages","stargazers_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/stargazers","contributors_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/contributors","subscribers_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/subscribers","subscription_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/subscription","commits_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/commits{/sha}","git_commits_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/git/commits{/sha}","comments_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/comments{/number}","issue_comment_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/issues/comments{/number}","contents_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/contents/{+path}","compare_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/merges","archive_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/downloads","issues_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/issues{/number}","pulls_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/pulls{/number}","milestones_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/milestones{/number}","notifications_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/labels{/name}","releases_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/releases{/id}","created_at":"2015-09-22T17:47:24Z","updated_at":"2015-11-09T15:33:03Z","pushed_at":"2015-12-02T10:30:51Z","git_url":"git://github.com/openwide-java/owsi-core-parent.git","ssh_url":"git@github.com:openwide-java/owsi-core-parent.git","clone_url":"https://github.com/openwide-java/owsi-core-parent.git","svn_url":"https://github.com/openwide-java/owsi-core-parent","homepage":"","size":12832,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"openwide-java:owsi-core-0.9-MAINTENANCE","ref":"owsi-core-0.9-MAINTENANCE","sha":"c45a9d1e98a2a18fd933c070bae04f7e1a27ed90","user":{"login":"openwide-java","id":1385131,"avatar_url":"https://avatars.githubusercontent.com/u/1385131?v=3","gravatar_id":"","url":"https://api.github.com/users/openwide-java","html_url":"https://github.com/openwide-java","followers_url":"https://api.github.com/users/openwide-java/followers","following_url":"https://api.github.com/users/openwide-java/following{/other_user}","gists_url":"https://api.github.com/users/openwide-java/gists{/gist_id}","starred_url":"https://api.github.com/users/openwide-java/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openwide-java/subscriptions","organizations_url":"https://api.github.com/users/openwide-java/orgs","repos_url":"https://api.github.com/users/openwide-java/repos","events_url":"https://api.github.com/users/openwide-java/events{/privacy}","received_events_url":"https://api.github.com/users/openwide-java/received_events","type":"Organization","site_admin":false},"repo":{"id":42950514,"name":"owsi-core-parent","full_name":"openwide-java/owsi-core-parent","owner":{"login":"openwide-java","id":1385131,"avatar_url":"https://avatars.githubusercontent.com/u/1385131?v=3","gravatar_id":"","url":"https://api.github.com/users/openwide-java","html_url":"https://github.com/openwide-java","followers_url":"https://api.github.com/users/openwide-java/followers","following_url":"https://api.github.com/users/openwide-java/following{/other_user}","gists_url":"https://api.github.com/users/openwide-java/gists{/gist_id}","starred_url":"https://api.github.com/users/openwide-java/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openwide-java/subscriptions","organizations_url":"https://api.github.com/users/openwide-java/orgs","repos_url":"https://api.github.com/users/openwide-java/repos","events_url":"https://api.github.com/users/openwide-java/events{/privacy}","received_events_url":"https://api.github.com/users/openwide-java/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openwide-java/owsi-core-parent","description":"Our Core framework based on Spring, Hibernate and Wicket","fork":false,"url":"https://api.github.com/repos/openwide-java/owsi-core-parent","forks_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/forks","keys_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/teams","hooks_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/hooks","issue_events_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/issues/events{/number}","events_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/events","assignees_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/assignees{/user}","branches_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/branches{/branch}","tags_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/tags","blobs_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/git/refs{/sha}","trees_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/statuses/{sha}","languages_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/languages","stargazers_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/stargazers","contributors_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/contributors","subscribers_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/subscribers","subscription_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/subscription","commits_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/commits{/sha}","git_commits_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/git/commits{/sha}","comments_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/comments{/number}","issue_comment_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/issues/comments{/number}","contents_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/contents/{+path}","compare_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/merges","archive_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/downloads","issues_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/issues{/number}","pulls_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/pulls{/number}","milestones_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/milestones{/number}","notifications_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/labels{/name}","releases_url":"https://api.github.com/repos/openwide-java/owsi-core-parent/releases{/id}","created_at":"2015-09-22T17:47:24Z","updated_at":"2015-11-09T15:33:03Z","pushed_at":"2015-12-02T10:30:51Z","git_url":"git://github.com/openwide-java/owsi-core-parent.git","ssh_url":"git@github.com:openwide-java/owsi-core-parent.git","clone_url":"https://github.com/openwide-java/owsi-core-parent.git","svn_url":"https://github.com/openwide-java/owsi-core-parent","homepage":"","size":12832,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openwide-java/owsi-core-parent/pulls/4"},"html":{"href":"https://github.com/openwide-java/owsi-core-parent/pull/4"},"issue":{"href":"https://api.github.com/repos/openwide-java/owsi-core-parent/issues/4"},"comments":{"href":"https://api.github.com/repos/openwide-java/owsi-core-parent/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/openwide-java/owsi-core-parent/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/openwide-java/owsi-core-parent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openwide-java/owsi-core-parent/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/openwide-java/owsi-core-parent/statuses/7a60a433e44106180c79c925e20c89f517b31a2d"}}}}