{"action":"reopened","number":216,"pull_request":{"url":"https://api.github.com/repos/drewnoakes/metadata-extractor/pulls/216","id":99596151,"html_url":"https://github.com/drewnoakes/metadata-extractor/pull/216","diff_url":"https://github.com/drewnoakes/metadata-extractor/pull/216.diff","patch_url":"https://github.com/drewnoakes/metadata-extractor/pull/216.patch","issue_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/issues/216","number":216,"state":"open","locked":false,"title":"Make Metadata serializable","user":{"login":"Nadahar","id":12900583,"avatar_url":"https://avatars.githubusercontent.com/u/12900583?v=3","gravatar_id":"","url":"https://api.github.com/users/Nadahar","html_url":"https://github.com/Nadahar","followers_url":"https://api.github.com/users/Nadahar/followers","following_url":"https://api.github.com/users/Nadahar/following{/other_user}","gists_url":"https://api.github.com/users/Nadahar/gists{/gist_id}","starred_url":"https://api.github.com/users/Nadahar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nadahar/subscriptions","organizations_url":"https://api.github.com/users/Nadahar/orgs","repos_url":"https://api.github.com/users/Nadahar/repos","events_url":"https://api.github.com/users/Nadahar/events{/privacy}","received_events_url":"https://api.github.com/users/Nadahar/received_events","type":"User","site_admin":false},"body":"I'd like to store the ```Metadata``` instances to a database where I can retrieve them without having to reparse the source (which might not be easily accessible). I gave it a go and it doesn't seem like making this serializable poses much trouble.\r\n\r\nThe only problem I came across was ```XMPMeta``` in ```XMPDirectory``` which isn't serializable and is an external class. Since it's created \"on demand\" I take it that this isn't crucial to have, it might look to me that it's an instance used during parsing that you've chosen to also offer in it's original form \"just in case\"? I simply made it ```transient``` meaning it will be lost on serialization. I really can't judge if that will pose any serious issue for a deserialized instance.\r\n\r\nProvided that the issue with ```XMPMeta``` isn't serious, it seems this is all it takes to make ```Metadata``` serializable. The exact details of how Java handles serialization internally is still not 100% clear to me, so there could be some other reason why you have opted to not make it serializable. But, if the case is that it simply never came up and loosing ```XMPMeta``` on deserialization is acceptable I'd appreciate if you'd take this into consideration.\r\n\r\nAs a side note, your POM states Java 1.5, but it won't compile until Java 1.6 since ```DecimalFormat.setRoundingMode()``` is used many places and wasn't introduced until Java 1.6.\r\n\r\nI also ran Findbugs to make sure this didn't create any new ones. While it doesn't, it found some existing issues that might pose a problem. As usual, most of them probably aren't very serious. I've attached a PDF of the report:\r\n\r\n[Metadata-extractor.pdf](https://github.com/drewnoakes/metadata-extractor/files/676351/Metadata-extractor.pdf)\r\n\r\n```GC_UNRELATED_TYPES``` and ```NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE``` could be of interest.","created_at":"2016-12-28T21:48:20Z","updated_at":"2017-01-01T23:59:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e73a5e82b1d980fcc8718ee370004b2ec00c6f99","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/pulls/216/commits","review_comments_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/pulls/216/comments","review_comment_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/issues/216/comments","statuses_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/statuses/b0deeac398943d0156ab0347e9c03abc1cb6f196","head":{"label":"Nadahar:master","ref":"master","sha":"b0deeac398943d0156ab0347e9c03abc1cb6f196","user":{"login":"Nadahar","id":12900583,"avatar_url":"https://avatars.githubusercontent.com/u/12900583?v=3","gravatar_id":"","url":"https://api.github.com/users/Nadahar","html_url":"https://github.com/Nadahar","followers_url":"https://api.github.com/users/Nadahar/followers","following_url":"https://api.github.com/users/Nadahar/following{/other_user}","gists_url":"https://api.github.com/users/Nadahar/gists{/gist_id}","starred_url":"https://api.github.com/users/Nadahar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nadahar/subscriptions","organizations_url":"https://api.github.com/users/Nadahar/orgs","repos_url":"https://api.github.com/users/Nadahar/repos","events_url":"https://api.github.com/users/Nadahar/events{/privacy}","received_events_url":"https://api.github.com/users/Nadahar/received_events","type":"User","site_admin":false},"repo":{"id":77013624,"name":"metadata-extractor","full_name":"Nadahar/metadata-extractor","owner":{"login":"Nadahar","id":12900583,"avatar_url":"https://avatars.githubusercontent.com/u/12900583?v=3","gravatar_id":"","url":"https://api.github.com/users/Nadahar","html_url":"https://github.com/Nadahar","followers_url":"https://api.github.com/users/Nadahar/followers","following_url":"https://api.github.com/users/Nadahar/following{/other_user}","gists_url":"https://api.github.com/users/Nadahar/gists{/gist_id}","starred_url":"https://api.github.com/users/Nadahar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nadahar/subscriptions","organizations_url":"https://api.github.com/users/Nadahar/orgs","repos_url":"https://api.github.com/users/Nadahar/repos","events_url":"https://api.github.com/users/Nadahar/events{/privacy}","received_events_url":"https://api.github.com/users/Nadahar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nadahar/metadata-extractor","description":"Extracts Exif, IPTC, XMP, ICC and other metadata from image files","fork":true,"url":"https://api.github.com/repos/Nadahar/metadata-extractor","forks_url":"https://api.github.com/repos/Nadahar/metadata-extractor/forks","keys_url":"https://api.github.com/repos/Nadahar/metadata-extractor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nadahar/metadata-extractor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nadahar/metadata-extractor/teams","hooks_url":"https://api.github.com/repos/Nadahar/metadata-extractor/hooks","issue_events_url":"https://api.github.com/repos/Nadahar/metadata-extractor/issues/events{/number}","events_url":"https://api.github.com/repos/Nadahar/metadata-extractor/events","assignees_url":"https://api.github.com/repos/Nadahar/metadata-extractor/assignees{/user}","branches_url":"https://api.github.com/repos/Nadahar/metadata-extractor/branches{/branch}","tags_url":"https://api.github.com/repos/Nadahar/metadata-extractor/tags","blobs_url":"https://api.github.com/repos/Nadahar/metadata-extractor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nadahar/metadata-extractor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nadahar/metadata-extractor/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nadahar/metadata-extractor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nadahar/metadata-extractor/statuses/{sha}","languages_url":"https://api.github.com/repos/Nadahar/metadata-extractor/languages","stargazers_url":"https://api.github.com/repos/Nadahar/metadata-extractor/stargazers","contributors_url":"https://api.github.com/repos/Nadahar/metadata-extractor/contributors","subscribers_url":"https://api.github.com/repos/Nadahar/metadata-extractor/subscribers","subscription_url":"https://api.github.com/repos/Nadahar/metadata-extractor/subscription","commits_url":"https://api.github.com/repos/Nadahar/metadata-extractor/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nadahar/metadata-extractor/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nadahar/metadata-extractor/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nadahar/metadata-extractor/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nadahar/metadata-extractor/contents/{+path}","compare_url":"https://api.github.com/repos/Nadahar/metadata-extractor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nadahar/metadata-extractor/merges","archive_url":"https://api.github.com/repos/Nadahar/metadata-extractor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nadahar/metadata-extractor/downloads","issues_url":"https://api.github.com/repos/Nadahar/metadata-extractor/issues{/number}","pulls_url":"https://api.github.com/repos/Nadahar/metadata-extractor/pulls{/number}","milestones_url":"https://api.github.com/repos/Nadahar/metadata-extractor/milestones{/number}","notifications_url":"https://api.github.com/repos/Nadahar/metadata-extractor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nadahar/metadata-extractor/labels{/name}","releases_url":"https://api.github.com/repos/Nadahar/metadata-extractor/releases{/id}","deployments_url":"https://api.github.com/repos/Nadahar/metadata-extractor/deployments","created_at":"2016-12-21T03:46:50Z","updated_at":"2016-12-21T03:46:55Z","pushed_at":"2017-01-01T23:40:27Z","git_url":"git://github.com/Nadahar/metadata-extractor.git","ssh_url":"git@github.com:Nadahar/metadata-extractor.git","clone_url":"https://github.com/Nadahar/metadata-extractor.git","svn_url":"https://github.com/Nadahar/metadata-extractor","homepage":null,"size":11238,"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":"drewnoakes:master","ref":"master","sha":"1765d5b9798506600ec438b52c9b135aaded8d87","user":{"login":"drewnoakes","id":350947,"avatar_url":"https://avatars.githubusercontent.com/u/350947?v=3","gravatar_id":"","url":"https://api.github.com/users/drewnoakes","html_url":"https://github.com/drewnoakes","followers_url":"https://api.github.com/users/drewnoakes/followers","following_url":"https://api.github.com/users/drewnoakes/following{/other_user}","gists_url":"https://api.github.com/users/drewnoakes/gists{/gist_id}","starred_url":"https://api.github.com/users/drewnoakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewnoakes/subscriptions","organizations_url":"https://api.github.com/users/drewnoakes/orgs","repos_url":"https://api.github.com/users/drewnoakes/repos","events_url":"https://api.github.com/users/drewnoakes/events{/privacy}","received_events_url":"https://api.github.com/users/drewnoakes/received_events","type":"User","site_admin":false},"repo":{"id":26836459,"name":"metadata-extractor","full_name":"drewnoakes/metadata-extractor","owner":{"login":"drewnoakes","id":350947,"avatar_url":"https://avatars.githubusercontent.com/u/350947?v=3","gravatar_id":"","url":"https://api.github.com/users/drewnoakes","html_url":"https://github.com/drewnoakes","followers_url":"https://api.github.com/users/drewnoakes/followers","following_url":"https://api.github.com/users/drewnoakes/following{/other_user}","gists_url":"https://api.github.com/users/drewnoakes/gists{/gist_id}","starred_url":"https://api.github.com/users/drewnoakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewnoakes/subscriptions","organizations_url":"https://api.github.com/users/drewnoakes/orgs","repos_url":"https://api.github.com/users/drewnoakes/repos","events_url":"https://api.github.com/users/drewnoakes/events{/privacy}","received_events_url":"https://api.github.com/users/drewnoakes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/drewnoakes/metadata-extractor","description":"Extracts Exif, IPTC, XMP, ICC and other metadata from image files","fork":false,"url":"https://api.github.com/repos/drewnoakes/metadata-extractor","forks_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/forks","keys_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/teams","hooks_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/hooks","issue_events_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/issues/events{/number}","events_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/events","assignees_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/assignees{/user}","branches_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/branches{/branch}","tags_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/tags","blobs_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/git/refs{/sha}","trees_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/statuses/{sha}","languages_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/languages","stargazers_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/stargazers","contributors_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/contributors","subscribers_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/subscribers","subscription_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/subscription","commits_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/commits{/sha}","git_commits_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/git/commits{/sha}","comments_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/comments{/number}","issue_comment_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/issues/comments{/number}","contents_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/contents/{+path}","compare_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/merges","archive_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/downloads","issues_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/issues{/number}","pulls_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/pulls{/number}","milestones_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/milestones{/number}","notifications_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/labels{/name}","releases_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/releases{/id}","deployments_url":"https://api.github.com/repos/drewnoakes/metadata-extractor/deployments","created_at":"2014-11-19T00:13:55Z","updated_at":"2017-01-01T09:24:07Z","pushed_at":"2016-12-29T21:03:41Z","git_url":"git://github.com/drewnoakes/metadata-extractor.git","ssh_url":"git@github.com:drewnoakes/metadata-extractor.git","clone_url":"https://github.com/drewnoakes/metadata-extractor.git","svn_url":"https://github.com/drewnoakes/metadata-extractor","homepage":null,"size":11150,"stargazers_count":538,"watchers_count":538,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":119,"mirror_url":null,"open_issues_count":45,"forks":119,"open_issues":45,"watchers":538,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/drewnoakes/metadata-extractor/pulls/216"},"html":{"href":"https://github.com/drewnoakes/metadata-extractor/pull/216"},"issue":{"href":"https://api.github.com/repos/drewnoakes/metadata-extractor/issues/216"},"comments":{"href":"https://api.github.com/repos/drewnoakes/metadata-extractor/issues/216/comments"},"review_comments":{"href":"https://api.github.com/repos/drewnoakes/metadata-extractor/pulls/216/comments"},"review_comment":{"href":"https://api.github.com/repos/drewnoakes/metadata-extractor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/drewnoakes/metadata-extractor/pulls/216/commits"},"statuses":{"href":"https://api.github.com/repos/drewnoakes/metadata-extractor/statuses/b0deeac398943d0156ab0347e9c03abc1cb6f196"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":9,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":130,"deletions":8,"changed_files":61}}
{"actor":{"display_login":"Nadahar"}}