{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/script-security-plugin/pulls/comments/61210743","id":61210743,"diff_hunk":"@@ -556,6 +556,20 @@ public Object invokeMethod(String name, Object args) {\n         assertEvaluate(new GenericWhitelist(), 3, \"'foo bar baz'.tokenize('ba').size()\");\n     }\n \n+    @Issue(\"JENKINS-33023\")\n+    @Test public void enums() throws Exception {\n+        String script = \"enum Thing {\\n\"\n+            + \"  FIRST(\\\"The first thing\\\");\\n\"\n+            + \"  String description;\\n\"\n+            + \"  public Thing(String description) {\\n\"\n+            + \"    this.description = description;\\n\"\n+            + \"  }\\n\"\n+            + \"}\\n\"\n+            + \"Thing.values()[0].description\\n\";\n+        String expected = \"The first thing\";\n+        assertEvaluate(new BlanketWhitelist(), expected, script);","path":"src/test/java/org/jenkinsci/plugins/scriptsecurity/sandbox/groovy/SandboxInterceptorTest.java","position":15,"original_position":15,"commit_id":"cb5b5cc21cfa8999903bcbcfd988bfcba35a79f7","original_commit_id":"cb5b5cc21cfa8999903bcbcfd988bfcba35a79f7","user":{"login":"magnusr","id":5188162,"avatar_url":"https://avatars.githubusercontent.com/u/5188162?v=3","gravatar_id":"","url":"https://api.github.com/users/magnusr","html_url":"https://github.com/magnusr","followers_url":"https://api.github.com/users/magnusr/followers","following_url":"https://api.github.com/users/magnusr/following{/other_user}","gists_url":"https://api.github.com/users/magnusr/gists{/gist_id}","starred_url":"https://api.github.com/users/magnusr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnusr/subscriptions","organizations_url":"https://api.github.com/users/magnusr/orgs","repos_url":"https://api.github.com/users/magnusr/repos","events_url":"https://api.github.com/users/magnusr/events{/privacy}","received_events_url":"https://api.github.com/users/magnusr/received_events","type":"User","site_admin":false},"body":"Yup, as you showed in your follow-up, GenericWhitelist was enough. The BlanketWhitelist was a copy-paste mistake on my behalf.","created_at":"2016-04-27T06:39:55Z","updated_at":"2016-04-27T06:39:55Z","html_url":"https://github.com/jenkinsci/script-security-plugin/pull/58#discussion_r61210743","pull_request_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/pulls/58","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/script-security-plugin/pulls/comments/61210743"},"html":{"href":"https://github.com/jenkinsci/script-security-plugin/pull/58#discussion_r61210743"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/script-security-plugin/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/script-security-plugin/pulls/58","id":67321903,"html_url":"https://github.com/jenkinsci/script-security-plugin/pull/58","diff_url":"https://github.com/jenkinsci/script-security-plugin/pull/58.diff","patch_url":"https://github.com/jenkinsci/script-security-plugin/pull/58.patch","issue_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/issues/58","number":58,"state":"closed","locked":false,"title":"Support enum initializers","user":{"login":"magnusr","id":5188162,"avatar_url":"https://avatars.githubusercontent.com/u/5188162?v=3","gravatar_id":"","url":"https://api.github.com/users/magnusr","html_url":"https://github.com/magnusr","followers_url":"https://api.github.com/users/magnusr/followers","following_url":"https://api.github.com/users/magnusr/following{/other_user}","gists_url":"https://api.github.com/users/magnusr/gists{/gist_id}","starred_url":"https://api.github.com/users/magnusr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnusr/subscriptions","organizations_url":"https://api.github.com/users/magnusr/orgs","repos_url":"https://api.github.com/users/magnusr/repos","events_url":"https://api.github.com/users/magnusr/events{/privacy}","received_events_url":"https://api.github.com/users/magnusr/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-21T09:23:10Z","updated_at":"2016-04-27T06:39:55Z","closed_at":"2016-04-26T18:19:47Z","merged_at":"2016-04-26T18:19:47Z","merge_commit_sha":"5b4623a06fe580a7beca083948fc9d99adac1b76","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/pulls/58/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/pulls/58/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/issues/58/comments","statuses_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/statuses/cb5b5cc21cfa8999903bcbcfd988bfcba35a79f7","head":{"label":"magnusr:feature/enums","ref":"feature/enums","sha":"cb5b5cc21cfa8999903bcbcfd988bfcba35a79f7","user":{"login":"magnusr","id":5188162,"avatar_url":"https://avatars.githubusercontent.com/u/5188162?v=3","gravatar_id":"","url":"https://api.github.com/users/magnusr","html_url":"https://github.com/magnusr","followers_url":"https://api.github.com/users/magnusr/followers","following_url":"https://api.github.com/users/magnusr/following{/other_user}","gists_url":"https://api.github.com/users/magnusr/gists{/gist_id}","starred_url":"https://api.github.com/users/magnusr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnusr/subscriptions","organizations_url":"https://api.github.com/users/magnusr/orgs","repos_url":"https://api.github.com/users/magnusr/repos","events_url":"https://api.github.com/users/magnusr/events{/privacy}","received_events_url":"https://api.github.com/users/magnusr/received_events","type":"User","site_admin":false},"repo":{"id":56760331,"name":"script-security-plugin","full_name":"magnusr/script-security-plugin","owner":{"login":"magnusr","id":5188162,"avatar_url":"https://avatars.githubusercontent.com/u/5188162?v=3","gravatar_id":"","url":"https://api.github.com/users/magnusr","html_url":"https://github.com/magnusr","followers_url":"https://api.github.com/users/magnusr/followers","following_url":"https://api.github.com/users/magnusr/following{/other_user}","gists_url":"https://api.github.com/users/magnusr/gists{/gist_id}","starred_url":"https://api.github.com/users/magnusr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnusr/subscriptions","organizations_url":"https://api.github.com/users/magnusr/orgs","repos_url":"https://api.github.com/users/magnusr/repos","events_url":"https://api.github.com/users/magnusr/events{/privacy}","received_events_url":"https://api.github.com/users/magnusr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/magnusr/script-security-plugin","description":"","fork":true,"url":"https://api.github.com/repos/magnusr/script-security-plugin","forks_url":"https://api.github.com/repos/magnusr/script-security-plugin/forks","keys_url":"https://api.github.com/repos/magnusr/script-security-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magnusr/script-security-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magnusr/script-security-plugin/teams","hooks_url":"https://api.github.com/repos/magnusr/script-security-plugin/hooks","issue_events_url":"https://api.github.com/repos/magnusr/script-security-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/magnusr/script-security-plugin/events","assignees_url":"https://api.github.com/repos/magnusr/script-security-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/magnusr/script-security-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/magnusr/script-security-plugin/tags","blobs_url":"https://api.github.com/repos/magnusr/script-security-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magnusr/script-security-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magnusr/script-security-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/magnusr/script-security-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magnusr/script-security-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/magnusr/script-security-plugin/languages","stargazers_url":"https://api.github.com/repos/magnusr/script-security-plugin/stargazers","contributors_url":"https://api.github.com/repos/magnusr/script-security-plugin/contributors","subscribers_url":"https://api.github.com/repos/magnusr/script-security-plugin/subscribers","subscription_url":"https://api.github.com/repos/magnusr/script-security-plugin/subscription","commits_url":"https://api.github.com/repos/magnusr/script-security-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/magnusr/script-security-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/magnusr/script-security-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/magnusr/script-security-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/magnusr/script-security-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/magnusr/script-security-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magnusr/script-security-plugin/merges","archive_url":"https://api.github.com/repos/magnusr/script-security-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magnusr/script-security-plugin/downloads","issues_url":"https://api.github.com/repos/magnusr/script-security-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/magnusr/script-security-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/magnusr/script-security-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/magnusr/script-security-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magnusr/script-security-plugin/labels{/name}","releases_url":"https://api.github.com/repos/magnusr/script-security-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/magnusr/script-security-plugin/deployments","created_at":"2016-04-21T09:21:50Z","updated_at":"2016-04-21T09:21:51Z","pushed_at":"2016-04-21T09:22:55Z","git_url":"git://github.com/magnusr/script-security-plugin.git","ssh_url":"git@github.com:magnusr/script-security-plugin.git","clone_url":"https://github.com/magnusr/script-security-plugin.git","svn_url":"https://github.com/magnusr/script-security-plugin","homepage":"","size":450,"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":"jenkinsci:master","ref":"master","sha":"324ce64688aa71b7a5bc5256530aa1f8b6ee998c","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":17301604,"name":"script-security-plugin","full_name":"jenkinsci/script-security-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/script-security-plugin","description":"","fork":false,"url":"https://api.github.com/repos/jenkinsci/script-security-plugin","forks_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/script-security-plugin/deployments","created_at":"2014-02-28T22:18:32Z","updated_at":"2016-01-19T14:37:25Z","pushed_at":"2016-04-26T22:08:47Z","git_url":"git://github.com/jenkinsci/script-security-plugin.git","ssh_url":"git@github.com:jenkinsci/script-security-plugin.git","clone_url":"https://github.com/jenkinsci/script-security-plugin.git","svn_url":"https://github.com/jenkinsci/script-security-plugin","homepage":"","size":518,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":2,"forks":20,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/script-security-plugin/pulls/58"},"html":{"href":"https://github.com/jenkinsci/script-security-plugin/pull/58"},"issue":{"href":"https://api.github.com/repos/jenkinsci/script-security-plugin/issues/58"},"comments":{"href":"https://api.github.com/repos/jenkinsci/script-security-plugin/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/script-security-plugin/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/script-security-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/script-security-plugin/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/script-security-plugin/statuses/cb5b5cc21cfa8999903bcbcfd988bfcba35a79f7"}}}}