{"action":"created","comment":{"url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/pulls/comments/55946611","id":55946611,"diff_hunk":"@@ -428,20 +396,18 @@ private static WebACAuthorization createAuthorizationFromMap(final Map<String, L\n         try {\n             final IdentifierConverter<Resource, FedoraResource> translator =\n                 new DefaultIdentifierTranslator(resource.getNode().getSession());\n-            final List<String> acls = new ArrayList<>();\n-            final Model model = createDefaultModel();\n-\n-            resource.getTriples(translator, PROPERTIES)\n-                .filter(t -> model.asStatement(t).getPredicate().hasURI(WEBAC_ACCESS_CONTROL_VALUE))\n-                .forEach(t -> {\n-                    if (!t.getObject().isURI()) {\n-                        final String error = String.format(\"The value %s of the %s on this resource must be a URI\",\n-                                t.getObject(), WEBAC_ACCESS_CONTROL_VALUE);\n-                        LOGGER.error(error);\n-                        throw new MalformedRdfException(error);\n-                    }\n-                    acls.add(t.getObject().getURI());\n-                });\n+            final List<String> acls = resource.getTriples(translator, PROPERTIES)\n+                    .filter(triple -> triple.getPredicate().equals(createURI(WEBAC_ACCESS_CONTROL_VALUE)))\n+                    .map(triple -> {\n+                        if (triple.getObject().isURI()) {\n+                            return triple.getObject().getURI();\n+                        } else {","path":"src/main/java/org/fcrepo/auth/webac/WebACRolesProvider.java","position":378,"original_position":378,"commit_id":"f5321e9cd6bd762e51b0635cf7bf7439232c6930","original_commit_id":"f5321e9cd6bd762e51b0635cf7bf7439232c6930","user":{"login":"ajs6f","id":110994,"avatar_url":"https://avatars.githubusercontent.com/u/110994?v=3","gravatar_id":"","url":"https://api.github.com/users/ajs6f","html_url":"https://github.com/ajs6f","followers_url":"https://api.github.com/users/ajs6f/followers","following_url":"https://api.github.com/users/ajs6f/following{/other_user}","gists_url":"https://api.github.com/users/ajs6f/gists{/gist_id}","starred_url":"https://api.github.com/users/ajs6f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajs6f/subscriptions","organizations_url":"https://api.github.com/users/ajs6f/orgs","repos_url":"https://api.github.com/users/ajs6f/repos","events_url":"https://api.github.com/users/ajs6f/events{/privacy}","received_events_url":"https://api.github.com/users/ajs6f/received_events","type":"User","site_admin":false},"body":"I don't think this `else` and braces are necessary, are they?","created_at":"2016-03-14T00:05:28Z","updated_at":"2016-03-14T00:05:28Z","html_url":"https://github.com/fcrepo4/fcrepo-module-auth-webac/pull/59#discussion_r55946611","pull_request_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/pulls/59","_links":{"self":{"href":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/pulls/comments/55946611"},"html":{"href":"https://github.com/fcrepo4/fcrepo-module-auth-webac/pull/59#discussion_r55946611"},"pull_request":{"href":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/pulls/59"}}},"pull_request":{"url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/pulls/59","id":62681241,"html_url":"https://github.com/fcrepo4/fcrepo-module-auth-webac/pull/59","diff_url":"https://github.com/fcrepo4/fcrepo-module-auth-webac/pull/59.diff","patch_url":"https://github.com/fcrepo4/fcrepo-module-auth-webac/pull/59.patch","issue_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/issues/59","number":59,"state":"open","locked":false,"title":"Tighten webac module code","user":{"login":"acoburn","id":1265883,"avatar_url":"https://avatars.githubusercontent.com/u/1265883?v=3","gravatar_id":"","url":"https://api.github.com/users/acoburn","html_url":"https://github.com/acoburn","followers_url":"https://api.github.com/users/acoburn/followers","following_url":"https://api.github.com/users/acoburn/following{/other_user}","gists_url":"https://api.github.com/users/acoburn/gists{/gist_id}","starred_url":"https://api.github.com/users/acoburn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acoburn/subscriptions","organizations_url":"https://api.github.com/users/acoburn/orgs","repos_url":"https://api.github.com/users/acoburn/repos","events_url":"https://api.github.com/users/acoburn/events{/privacy}","received_events_url":"https://api.github.com/users/acoburn/received_events","type":"User","site_admin":false},"body":"Resolves: https://jira.duraspace.org/browse/FCREPO-1946\r\n\r\n  * Remove unnecessary translations between Triples and Statements\r\n  * Use `static import` when possible\r\n  * Shorten stream-based code by using matching predicates (`anyMatch`, `allMatch`)\r\n  * Use stream collectors where possible\r\n  * Combine predicates where possible\r\n  * Make lambdas more readable by replacing x with more meaningful variable names\r\n  * Change test logging output from DEBUG to INFO\r\n  * Remove unnecessary `uncheck` formulations\r\n  * Update documentation where appropriate\r\n  * Remove the JCR_CONTENT translation, as the Modeshape impl no longer leaks that information\r\n","created_at":"2016-03-13T19:58:02Z","updated_at":"2016-03-14T00:05:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05f92b3ccd69df69203cb5d6c07e824361ee8c8c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/pulls/59/commits","review_comments_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/pulls/59/comments","review_comment_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/issues/59/comments","statuses_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/statuses/f5321e9cd6bd762e51b0635cf7bf7439232c6930","head":{"label":"acoburn:fcrepo-1946","ref":"fcrepo-1946","sha":"f5321e9cd6bd762e51b0635cf7bf7439232c6930","user":{"login":"acoburn","id":1265883,"avatar_url":"https://avatars.githubusercontent.com/u/1265883?v=3","gravatar_id":"","url":"https://api.github.com/users/acoburn","html_url":"https://github.com/acoburn","followers_url":"https://api.github.com/users/acoburn/followers","following_url":"https://api.github.com/users/acoburn/following{/other_user}","gists_url":"https://api.github.com/users/acoburn/gists{/gist_id}","starred_url":"https://api.github.com/users/acoburn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acoburn/subscriptions","organizations_url":"https://api.github.com/users/acoburn/orgs","repos_url":"https://api.github.com/users/acoburn/repos","events_url":"https://api.github.com/users/acoburn/events{/privacy}","received_events_url":"https://api.github.com/users/acoburn/received_events","type":"User","site_admin":false},"repo":{"id":41316911,"name":"fcrepo-module-auth-webac","full_name":"acoburn/fcrepo-module-auth-webac","owner":{"login":"acoburn","id":1265883,"avatar_url":"https://avatars.githubusercontent.com/u/1265883?v=3","gravatar_id":"","url":"https://api.github.com/users/acoburn","html_url":"https://github.com/acoburn","followers_url":"https://api.github.com/users/acoburn/followers","following_url":"https://api.github.com/users/acoburn/following{/other_user}","gists_url":"https://api.github.com/users/acoburn/gists{/gist_id}","starred_url":"https://api.github.com/users/acoburn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acoburn/subscriptions","organizations_url":"https://api.github.com/users/acoburn/orgs","repos_url":"https://api.github.com/users/acoburn/repos","events_url":"https://api.github.com/users/acoburn/events{/privacy}","received_events_url":"https://api.github.com/users/acoburn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/acoburn/fcrepo-module-auth-webac","description":"WebAC Authorization Delegate Module for the Fedora 4 Repository","fork":true,"url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac","forks_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/forks","keys_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/teams","hooks_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/hooks","issue_events_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/issues/events{/number}","events_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/events","assignees_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/assignees{/user}","branches_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/branches{/branch}","tags_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/tags","blobs_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/git/refs{/sha}","trees_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/statuses/{sha}","languages_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/languages","stargazers_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/stargazers","contributors_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/contributors","subscribers_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/subscribers","subscription_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/subscription","commits_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/commits{/sha}","git_commits_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/git/commits{/sha}","comments_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/comments{/number}","issue_comment_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/issues/comments{/number}","contents_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/contents/{+path}","compare_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/merges","archive_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/downloads","issues_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/issues{/number}","pulls_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/pulls{/number}","milestones_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/milestones{/number}","notifications_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/labels{/name}","releases_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/releases{/id}","deployments_url":"https://api.github.com/repos/acoburn/fcrepo-module-auth-webac/deployments","created_at":"2015-08-24T17:22:35Z","updated_at":"2015-11-01T02:26:30Z","pushed_at":"2016-03-13T19:54:26Z","git_url":"git://github.com/acoburn/fcrepo-module-auth-webac.git","ssh_url":"git@github.com:acoburn/fcrepo-module-auth-webac.git","clone_url":"https://github.com/acoburn/fcrepo-module-auth-webac.git","svn_url":"https://github.com/acoburn/fcrepo-module-auth-webac","homepage":null,"size":154,"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":"master"}},"base":{"label":"fcrepo4:master","ref":"master","sha":"32015b3f504c751daa97269f40fdd097b3577ffe","user":{"login":"fcrepo4","id":3057565,"avatar_url":"https://avatars.githubusercontent.com/u/3057565?v=3","gravatar_id":"","url":"https://api.github.com/users/fcrepo4","html_url":"https://github.com/fcrepo4","followers_url":"https://api.github.com/users/fcrepo4/followers","following_url":"https://api.github.com/users/fcrepo4/following{/other_user}","gists_url":"https://api.github.com/users/fcrepo4/gists{/gist_id}","starred_url":"https://api.github.com/users/fcrepo4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fcrepo4/subscriptions","organizations_url":"https://api.github.com/users/fcrepo4/orgs","repos_url":"https://api.github.com/users/fcrepo4/repos","events_url":"https://api.github.com/users/fcrepo4/events{/privacy}","received_events_url":"https://api.github.com/users/fcrepo4/received_events","type":"Organization","site_admin":false},"repo":{"id":41306056,"name":"fcrepo-module-auth-webac","full_name":"fcrepo4/fcrepo-module-auth-webac","owner":{"login":"fcrepo4","id":3057565,"avatar_url":"https://avatars.githubusercontent.com/u/3057565?v=3","gravatar_id":"","url":"https://api.github.com/users/fcrepo4","html_url":"https://github.com/fcrepo4","followers_url":"https://api.github.com/users/fcrepo4/followers","following_url":"https://api.github.com/users/fcrepo4/following{/other_user}","gists_url":"https://api.github.com/users/fcrepo4/gists{/gist_id}","starred_url":"https://api.github.com/users/fcrepo4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fcrepo4/subscriptions","organizations_url":"https://api.github.com/users/fcrepo4/orgs","repos_url":"https://api.github.com/users/fcrepo4/repos","events_url":"https://api.github.com/users/fcrepo4/events{/privacy}","received_events_url":"https://api.github.com/users/fcrepo4/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fcrepo4/fcrepo-module-auth-webac","description":"WebAC Authorization Delegate Module for the Fedora 4 Repository","fork":false,"url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac","forks_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/forks","keys_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/teams","hooks_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/hooks","issue_events_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/issues/events{/number}","events_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/events","assignees_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/assignees{/user}","branches_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/branches{/branch}","tags_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/tags","blobs_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/git/refs{/sha}","trees_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/statuses/{sha}","languages_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/languages","stargazers_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/stargazers","contributors_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/contributors","subscribers_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/subscribers","subscription_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/subscription","commits_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/commits{/sha}","git_commits_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/git/commits{/sha}","comments_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/comments{/number}","issue_comment_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/issues/comments{/number}","contents_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/contents/{+path}","compare_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/merges","archive_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/downloads","issues_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/issues{/number}","pulls_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/pulls{/number}","milestones_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/milestones{/number}","notifications_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/labels{/name}","releases_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/releases{/id}","deployments_url":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/deployments","created_at":"2015-08-24T13:56:04Z","updated_at":"2016-01-27T13:26:46Z","pushed_at":"2016-03-13T19:58:03Z","git_url":"git://github.com/fcrepo4/fcrepo-module-auth-webac.git","ssh_url":"git@github.com:fcrepo4/fcrepo-module-auth-webac.git","clone_url":"https://github.com/fcrepo4/fcrepo-module-auth-webac.git","svn_url":"https://github.com/fcrepo4/fcrepo-module-auth-webac","homepage":null,"size":604,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":2,"forks":6,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/pulls/59"},"html":{"href":"https://github.com/fcrepo4/fcrepo-module-auth-webac/pull/59"},"issue":{"href":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/issues/59"},"comments":{"href":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/issues/59/comments"},"review_comments":{"href":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/pulls/59/comments"},"review_comment":{"href":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/pulls/59/commits"},"statuses":{"href":"https://api.github.com/repos/fcrepo4/fcrepo-module-auth-webac/statuses/f5321e9cd6bd762e51b0635cf7bf7439232c6930"}}}}