{"action":"created","comment":{"url":"https://api.github.com/repos/fcrepo4/fcrepo4/pulls/comments/53043949","id":53043949,"diff_hunk":"@@ -563,11 +569,31 @@ public void replaceProperties(final IdentifierConverter<Resource, FedoraResource\n             exceptions.append(e.getMessage());\n         }\n \n+        removeEmptyFragments();\n+\n         if (exceptions.length() > 0) {\n             throw new MalformedRdfException(exceptions.toString());\n         }\n     }\n \n+    private void removeEmptyFragments() {\n+        try {\n+            if (node.hasNode(\"#\")) {","path":"fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/FedoraResourceImpl.java","position":47,"original_position":47,"commit_id":"182b23e9e75f803e272de938d8fcbc377cf47c4d","original_commit_id":"182b23e9e75f803e272de938d8fcbc377cf47c4d","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":"Oh, that's the use of `getNode`, which throws `PathNotFoundException` when there is no node. That's a crap API. You could do `getNodes(\"#\")` but that's not really any better. Oh, well.","created_at":"2016-02-16T17:18:06Z","updated_at":"2016-02-16T17:18:06Z","html_url":"https://github.com/fcrepo4/fcrepo4/pull/982#discussion_r53043949","pull_request_url":"https://api.github.com/repos/fcrepo4/fcrepo4/pulls/982","_links":{"self":{"href":"https://api.github.com/repos/fcrepo4/fcrepo4/pulls/comments/53043949"},"html":{"href":"https://github.com/fcrepo4/fcrepo4/pull/982#discussion_r53043949"},"pull_request":{"href":"https://api.github.com/repos/fcrepo4/fcrepo4/pulls/982"}}},"pull_request":{"url":"https://api.github.com/repos/fcrepo4/fcrepo4/pulls/982","id":59514661,"html_url":"https://github.com/fcrepo4/fcrepo4/pull/982","diff_url":"https://github.com/fcrepo4/fcrepo4/pull/982.diff","patch_url":"https://github.com/fcrepo4/fcrepo4/pull/982.patch","issue_url":"https://api.github.com/repos/fcrepo4/fcrepo4/issues/982","number":982,"state":"open","locked":false,"title":"Remove empty hash URI fragments after updates.","user":{"login":"escowles","id":856924,"avatar_url":"https://avatars.githubusercontent.com/u/856924?v=3","gravatar_id":"","url":"https://api.github.com/users/escowles","html_url":"https://github.com/escowles","followers_url":"https://api.github.com/users/escowles/followers","following_url":"https://api.github.com/users/escowles/following{/other_user}","gists_url":"https://api.github.com/users/escowles/gists{/gist_id}","starred_url":"https://api.github.com/users/escowles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/escowles/subscriptions","organizations_url":"https://api.github.com/users/escowles/orgs","repos_url":"https://api.github.com/users/escowles/repos","events_url":"https://api.github.com/users/escowles/events{/privacy}","received_events_url":"https://api.github.com/users/escowles/received_events","type":"User","site_admin":false},"body":"Fixes https://jira.duraspace.org/browse/FCREPO-1764","created_at":"2016-02-16T16:21:42Z","updated_at":"2016-02-16T17:18:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"42ba7791036640c68b02dbe3b71c2ef6a79c7f4b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fcrepo4/fcrepo4/pulls/982/commits","review_comments_url":"https://api.github.com/repos/fcrepo4/fcrepo4/pulls/982/comments","review_comment_url":"https://api.github.com/repos/fcrepo4/fcrepo4/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fcrepo4/fcrepo4/issues/982/comments","statuses_url":"https://api.github.com/repos/fcrepo4/fcrepo4/statuses/182b23e9e75f803e272de938d8fcbc377cf47c4d","head":{"label":"escowles:remove-empty-fragments","ref":"remove-empty-fragments","sha":"182b23e9e75f803e272de938d8fcbc377cf47c4d","user":{"login":"escowles","id":856924,"avatar_url":"https://avatars.githubusercontent.com/u/856924?v=3","gravatar_id":"","url":"https://api.github.com/users/escowles","html_url":"https://github.com/escowles","followers_url":"https://api.github.com/users/escowles/followers","following_url":"https://api.github.com/users/escowles/following{/other_user}","gists_url":"https://api.github.com/users/escowles/gists{/gist_id}","starred_url":"https://api.github.com/users/escowles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/escowles/subscriptions","organizations_url":"https://api.github.com/users/escowles/orgs","repos_url":"https://api.github.com/users/escowles/repos","events_url":"https://api.github.com/users/escowles/events{/privacy}","received_events_url":"https://api.github.com/users/escowles/received_events","type":"User","site_admin":false},"repo":{"id":13322687,"name":"fcrepo4","full_name":"escowles/fcrepo4","owner":{"login":"escowles","id":856924,"avatar_url":"https://avatars.githubusercontent.com/u/856924?v=3","gravatar_id":"","url":"https://api.github.com/users/escowles","html_url":"https://github.com/escowles","followers_url":"https://api.github.com/users/escowles/followers","following_url":"https://api.github.com/users/escowles/following{/other_user}","gists_url":"https://api.github.com/users/escowles/gists{/gist_id}","starred_url":"https://api.github.com/users/escowles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/escowles/subscriptions","organizations_url":"https://api.github.com/users/escowles/orgs","repos_url":"https://api.github.com/users/escowles/repos","events_url":"https://api.github.com/users/escowles/events{/privacy}","received_events_url":"https://api.github.com/users/escowles/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/escowles/fcrepo4","description":"Fedora 4: \"Changing everything, two weeks at a time\"","fork":true,"url":"https://api.github.com/repos/escowles/fcrepo4","forks_url":"https://api.github.com/repos/escowles/fcrepo4/forks","keys_url":"https://api.github.com/repos/escowles/fcrepo4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/escowles/fcrepo4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/escowles/fcrepo4/teams","hooks_url":"https://api.github.com/repos/escowles/fcrepo4/hooks","issue_events_url":"https://api.github.com/repos/escowles/fcrepo4/issues/events{/number}","events_url":"https://api.github.com/repos/escowles/fcrepo4/events","assignees_url":"https://api.github.com/repos/escowles/fcrepo4/assignees{/user}","branches_url":"https://api.github.com/repos/escowles/fcrepo4/branches{/branch}","tags_url":"https://api.github.com/repos/escowles/fcrepo4/tags","blobs_url":"https://api.github.com/repos/escowles/fcrepo4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/escowles/fcrepo4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/escowles/fcrepo4/git/refs{/sha}","trees_url":"https://api.github.com/repos/escowles/fcrepo4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/escowles/fcrepo4/statuses/{sha}","languages_url":"https://api.github.com/repos/escowles/fcrepo4/languages","stargazers_url":"https://api.github.com/repos/escowles/fcrepo4/stargazers","contributors_url":"https://api.github.com/repos/escowles/fcrepo4/contributors","subscribers_url":"https://api.github.com/repos/escowles/fcrepo4/subscribers","subscription_url":"https://api.github.com/repos/escowles/fcrepo4/subscription","commits_url":"https://api.github.com/repos/escowles/fcrepo4/commits{/sha}","git_commits_url":"https://api.github.com/repos/escowles/fcrepo4/git/commits{/sha}","comments_url":"https://api.github.com/repos/escowles/fcrepo4/comments{/number}","issue_comment_url":"https://api.github.com/repos/escowles/fcrepo4/issues/comments{/number}","contents_url":"https://api.github.com/repos/escowles/fcrepo4/contents/{+path}","compare_url":"https://api.github.com/repos/escowles/fcrepo4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/escowles/fcrepo4/merges","archive_url":"https://api.github.com/repos/escowles/fcrepo4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/escowles/fcrepo4/downloads","issues_url":"https://api.github.com/repos/escowles/fcrepo4/issues{/number}","pulls_url":"https://api.github.com/repos/escowles/fcrepo4/pulls{/number}","milestones_url":"https://api.github.com/repos/escowles/fcrepo4/milestones{/number}","notifications_url":"https://api.github.com/repos/escowles/fcrepo4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/escowles/fcrepo4/labels{/name}","releases_url":"https://api.github.com/repos/escowles/fcrepo4/releases{/id}","deployments_url":"https://api.github.com/repos/escowles/fcrepo4/deployments","created_at":"2013-10-04T11:31:35Z","updated_at":"2015-04-08T16:30:43Z","pushed_at":"2016-02-16T16:21:33Z","git_url":"git://github.com/escowles/fcrepo4.git","ssh_url":"git@github.com:escowles/fcrepo4.git","clone_url":"https://github.com/escowles/fcrepo4.git","svn_url":"https://github.com/escowles/fcrepo4","homepage":"http://futures.github.com/fcrepo4/","size":34527,"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":"5d686979b5cd4eeb0926cd8c5b9c26701071a19c","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":7992797,"name":"fcrepo4","full_name":"fcrepo4/fcrepo4","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/fcrepo4","description":"Fedora 4","fork":false,"url":"https://api.github.com/repos/fcrepo4/fcrepo4","forks_url":"https://api.github.com/repos/fcrepo4/fcrepo4/forks","keys_url":"https://api.github.com/repos/fcrepo4/fcrepo4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fcrepo4/fcrepo4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fcrepo4/fcrepo4/teams","hooks_url":"https://api.github.com/repos/fcrepo4/fcrepo4/hooks","issue_events_url":"https://api.github.com/repos/fcrepo4/fcrepo4/issues/events{/number}","events_url":"https://api.github.com/repos/fcrepo4/fcrepo4/events","assignees_url":"https://api.github.com/repos/fcrepo4/fcrepo4/assignees{/user}","branches_url":"https://api.github.com/repos/fcrepo4/fcrepo4/branches{/branch}","tags_url":"https://api.github.com/repos/fcrepo4/fcrepo4/tags","blobs_url":"https://api.github.com/repos/fcrepo4/fcrepo4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fcrepo4/fcrepo4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fcrepo4/fcrepo4/git/refs{/sha}","trees_url":"https://api.github.com/repos/fcrepo4/fcrepo4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fcrepo4/fcrepo4/statuses/{sha}","languages_url":"https://api.github.com/repos/fcrepo4/fcrepo4/languages","stargazers_url":"https://api.github.com/repos/fcrepo4/fcrepo4/stargazers","contributors_url":"https://api.github.com/repos/fcrepo4/fcrepo4/contributors","subscribers_url":"https://api.github.com/repos/fcrepo4/fcrepo4/subscribers","subscription_url":"https://api.github.com/repos/fcrepo4/fcrepo4/subscription","commits_url":"https://api.github.com/repos/fcrepo4/fcrepo4/commits{/sha}","git_commits_url":"https://api.github.com/repos/fcrepo4/fcrepo4/git/commits{/sha}","comments_url":"https://api.github.com/repos/fcrepo4/fcrepo4/comments{/number}","issue_comment_url":"https://api.github.com/repos/fcrepo4/fcrepo4/issues/comments{/number}","contents_url":"https://api.github.com/repos/fcrepo4/fcrepo4/contents/{+path}","compare_url":"https://api.github.com/repos/fcrepo4/fcrepo4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fcrepo4/fcrepo4/merges","archive_url":"https://api.github.com/repos/fcrepo4/fcrepo4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fcrepo4/fcrepo4/downloads","issues_url":"https://api.github.com/repos/fcrepo4/fcrepo4/issues{/number}","pulls_url":"https://api.github.com/repos/fcrepo4/fcrepo4/pulls{/number}","milestones_url":"https://api.github.com/repos/fcrepo4/fcrepo4/milestones{/number}","notifications_url":"https://api.github.com/repos/fcrepo4/fcrepo4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fcrepo4/fcrepo4/labels{/name}","releases_url":"https://api.github.com/repos/fcrepo4/fcrepo4/releases{/id}","deployments_url":"https://api.github.com/repos/fcrepo4/fcrepo4/deployments","created_at":"2013-02-03T16:18:55Z","updated_at":"2016-01-21T13:13:11Z","pushed_at":"2016-02-16T16:21:43Z","git_url":"git://github.com/fcrepo4/fcrepo4.git","ssh_url":"git@github.com:fcrepo4/fcrepo4.git","clone_url":"https://github.com/fcrepo4/fcrepo4.git","svn_url":"https://github.com/fcrepo4/fcrepo4","homepage":"http://github.com/fcrepo4/fcrepo4","size":136881,"stargazers_count":60,"watchers_count":60,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":79,"mirror_url":null,"open_issues_count":32,"forks":79,"open_issues":32,"watchers":60,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fcrepo4/fcrepo4/pulls/982"},"html":{"href":"https://github.com/fcrepo4/fcrepo4/pull/982"},"issue":{"href":"https://api.github.com/repos/fcrepo4/fcrepo4/issues/982"},"comments":{"href":"https://api.github.com/repos/fcrepo4/fcrepo4/issues/982/comments"},"review_comments":{"href":"https://api.github.com/repos/fcrepo4/fcrepo4/pulls/982/comments"},"review_comment":{"href":"https://api.github.com/repos/fcrepo4/fcrepo4/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fcrepo4/fcrepo4/pulls/982/commits"},"statuses":{"href":"https://api.github.com/repos/fcrepo4/fcrepo4/statuses/182b23e9e75f803e272de938d8fcbc377cf47c4d"}}}}