{"action":"created","comment":{"url":"https://api.github.com/repos/codice/ddf/pulls/comments/123800102","pull_request_review_id":46041976,"id":123800102,"diff_hunk":"@@ -178,8 +179,13 @@ protected Object executeWithSubject() throws Exception {\n         console.println(\"Starting metacard export...\");\n         Instant start = Instant.now();\n         List<ExportItem> exportedItems = doMetacardExport(zipFile, filter);\n-        console.println(\"Metacards exported in: \" + getFormattedDuration(start));\n+        if (exportedItems.isEmpty()) {\n+            console.println(\"No metacards found to export, exiting.\");\n+            FileUtils.deleteQuietly(zipFile.getFile());","path":"catalog/core/catalog-core-commands/src/main/java/org/codice/ddf/commands/catalog/ExportCommand.java","position":65,"original_position":65,"commit_id":"3038d18514ad8ea9575b2c6ec6c2b0e22092b29f","original_commit_id":"3038d18514ad8ea9575b2c6ec6c2b0e22092b29f","user":{"login":"coyotesqrl","id":1469860,"avatar_url":"https://avatars1.githubusercontent.com/u/1469860?v=3","gravatar_id":"","url":"https://api.github.com/users/coyotesqrl","html_url":"https://github.com/coyotesqrl","followers_url":"https://api.github.com/users/coyotesqrl/followers","following_url":"https://api.github.com/users/coyotesqrl/following{/other_user}","gists_url":"https://api.github.com/users/coyotesqrl/gists{/gist_id}","starred_url":"https://api.github.com/users/coyotesqrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coyotesqrl/subscriptions","organizations_url":"https://api.github.com/users/coyotesqrl/orgs","repos_url":"https://api.github.com/users/coyotesqrl/repos","events_url":"https://api.github.com/users/coyotesqrl/events{/privacy}","received_events_url":"https://api.github.com/users/coyotesqrl/received_events","type":"User","site_admin":false},"body":"❓ I believe this is the only place where you close the file (implicitly, with the `deleteQuietly`), so in the case where there are metacards exported, you'll leave it open. Might be best to use try-with-resources or wrap in a try/finally.","created_at":"2017-06-23T17:13:53Z","updated_at":"2017-06-23T17:16:08Z","html_url":"https://github.com/codice/ddf/pull/1975#discussion_r123800102","pull_request_url":"https://api.github.com/repos/codice/ddf/pulls/1975","_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments/123800102"},"html":{"href":"https://github.com/codice/ddf/pull/1975#discussion_r123800102"},"pull_request":{"href":"https://api.github.com/repos/codice/ddf/pulls/1975"}}},"pull_request":{"url":"https://api.github.com/repos/codice/ddf/pulls/1975","id":120007344,"html_url":"https://github.com/codice/ddf/pull/1975","diff_url":"https://github.com/codice/ddf/pull/1975.diff","patch_url":"https://github.com/codice/ddf/pull/1975.patch","issue_url":"https://api.github.com/repos/codice/ddf/issues/1975","number":1975,"state":"open","locked":false,"title":"DDF-2698 Remove -d alias from Export Command","user":{"login":"rzwiefel","id":9013416,"avatar_url":"https://avatars3.githubusercontent.com/u/9013416?v=3","gravatar_id":"","url":"https://api.github.com/users/rzwiefel","html_url":"https://github.com/rzwiefel","followers_url":"https://api.github.com/users/rzwiefel/followers","following_url":"https://api.github.com/users/rzwiefel/following{/other_user}","gists_url":"https://api.github.com/users/rzwiefel/gists{/gist_id}","starred_url":"https://api.github.com/users/rzwiefel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rzwiefel/subscriptions","organizations_url":"https://api.github.com/users/rzwiefel/orgs","repos_url":"https://api.github.com/users/rzwiefel/repos","events_url":"https://api.github.com/users/rzwiefel/events{/privacy}","received_events_url":"https://api.github.com/users/rzwiefel/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\n - Removes `-d` delete alias from export command\r\n - Short circuits trying to sign zip if nothing was exported\r\n - Added unit tests for Export Command\r\n#### Who is reviewing it (please choose AT LEAST two reviewers that need to approve the PR before it can get merged)?\r\n@adimka @bdeining \r\n\r\n#### Choose 2 committers to review/merge the PR (please choose ONLY two committers from below, delete the rest).\r\n\r\n@coyotesqrl\r\n@lessarderic\r\n\r\n#### How should this be tested? (List steps with links to updated documentation)\r\n1. Ensure -d command has no conflicts\r\n2. Ensure on an export with no metacards or content there are no errors in the log\r\n#### What are the relevant tickets?\r\nhttps://codice.atlassian.net/browse/DDF-2698\r\n\r\n#### Checklist:\r\n- [x] Update / Add Unit Tests\r\n","created_at":"2017-05-11T00:51:47Z","updated_at":"2017-06-23T17:16:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1347c769be15caee3c75938bf88193970e648720","assignee":{"login":"coyotesqrl","id":1469860,"avatar_url":"https://avatars1.githubusercontent.com/u/1469860?v=3","gravatar_id":"","url":"https://api.github.com/users/coyotesqrl","html_url":"https://github.com/coyotesqrl","followers_url":"https://api.github.com/users/coyotesqrl/followers","following_url":"https://api.github.com/users/coyotesqrl/following{/other_user}","gists_url":"https://api.github.com/users/coyotesqrl/gists{/gist_id}","starred_url":"https://api.github.com/users/coyotesqrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coyotesqrl/subscriptions","organizations_url":"https://api.github.com/users/coyotesqrl/orgs","repos_url":"https://api.github.com/users/coyotesqrl/repos","events_url":"https://api.github.com/users/coyotesqrl/events{/privacy}","received_events_url":"https://api.github.com/users/coyotesqrl/received_events","type":"User","site_admin":false},"assignees":[{"login":"coyotesqrl","id":1469860,"avatar_url":"https://avatars1.githubusercontent.com/u/1469860?v=3","gravatar_id":"","url":"https://api.github.com/users/coyotesqrl","html_url":"https://github.com/coyotesqrl","followers_url":"https://api.github.com/users/coyotesqrl/followers","following_url":"https://api.github.com/users/coyotesqrl/following{/other_user}","gists_url":"https://api.github.com/users/coyotesqrl/gists{/gist_id}","starred_url":"https://api.github.com/users/coyotesqrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coyotesqrl/subscriptions","organizations_url":"https://api.github.com/users/coyotesqrl/orgs","repos_url":"https://api.github.com/users/coyotesqrl/repos","events_url":"https://api.github.com/users/coyotesqrl/events{/privacy}","received_events_url":"https://api.github.com/users/coyotesqrl/received_events","type":"User","site_admin":false},{"login":"lessarderic","id":11377558,"avatar_url":"https://avatars2.githubusercontent.com/u/11377558?v=3","gravatar_id":"","url":"https://api.github.com/users/lessarderic","html_url":"https://github.com/lessarderic","followers_url":"https://api.github.com/users/lessarderic/followers","following_url":"https://api.github.com/users/lessarderic/following{/other_user}","gists_url":"https://api.github.com/users/lessarderic/gists{/gist_id}","starred_url":"https://api.github.com/users/lessarderic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lessarderic/subscriptions","organizations_url":"https://api.github.com/users/lessarderic/orgs","repos_url":"https://api.github.com/users/lessarderic/repos","events_url":"https://api.github.com/users/lessarderic/events{/privacy}","received_events_url":"https://api.github.com/users/lessarderic/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/codice/ddf/pulls/1975/commits","review_comments_url":"https://api.github.com/repos/codice/ddf/pulls/1975/comments","review_comment_url":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codice/ddf/issues/1975/comments","statuses_url":"https://api.github.com/repos/codice/ddf/statuses/3038d18514ad8ea9575b2c6ec6c2b0e22092b29f","head":{"label":"rzwiefel:DDF-2698-remove-delete-alias","ref":"DDF-2698-remove-delete-alias","sha":"3038d18514ad8ea9575b2c6ec6c2b0e22092b29f","user":{"login":"rzwiefel","id":9013416,"avatar_url":"https://avatars3.githubusercontent.com/u/9013416?v=3","gravatar_id":"","url":"https://api.github.com/users/rzwiefel","html_url":"https://github.com/rzwiefel","followers_url":"https://api.github.com/users/rzwiefel/followers","following_url":"https://api.github.com/users/rzwiefel/following{/other_user}","gists_url":"https://api.github.com/users/rzwiefel/gists{/gist_id}","starred_url":"https://api.github.com/users/rzwiefel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rzwiefel/subscriptions","organizations_url":"https://api.github.com/users/rzwiefel/orgs","repos_url":"https://api.github.com/users/rzwiefel/repos","events_url":"https://api.github.com/users/rzwiefel/events{/privacy}","received_events_url":"https://api.github.com/users/rzwiefel/received_events","type":"User","site_admin":false},"repo":{"id":37286795,"name":"ddf","full_name":"rzwiefel/ddf","owner":{"login":"rzwiefel","id":9013416,"avatar_url":"https://avatars3.githubusercontent.com/u/9013416?v=3","gravatar_id":"","url":"https://api.github.com/users/rzwiefel","html_url":"https://github.com/rzwiefel","followers_url":"https://api.github.com/users/rzwiefel/followers","following_url":"https://api.github.com/users/rzwiefel/following{/other_user}","gists_url":"https://api.github.com/users/rzwiefel/gists{/gist_id}","starred_url":"https://api.github.com/users/rzwiefel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rzwiefel/subscriptions","organizations_url":"https://api.github.com/users/rzwiefel/orgs","repos_url":"https://api.github.com/users/rzwiefel/repos","events_url":"https://api.github.com/users/rzwiefel/events{/privacy}","received_events_url":"https://api.github.com/users/rzwiefel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rzwiefel/ddf","description":"The Distributed Data Framework - Distribution, SDK, and Test","fork":true,"url":"https://api.github.com/repos/rzwiefel/ddf","forks_url":"https://api.github.com/repos/rzwiefel/ddf/forks","keys_url":"https://api.github.com/repos/rzwiefel/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rzwiefel/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rzwiefel/ddf/teams","hooks_url":"https://api.github.com/repos/rzwiefel/ddf/hooks","issue_events_url":"https://api.github.com/repos/rzwiefel/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/rzwiefel/ddf/events","assignees_url":"https://api.github.com/repos/rzwiefel/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/rzwiefel/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/rzwiefel/ddf/tags","blobs_url":"https://api.github.com/repos/rzwiefel/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rzwiefel/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rzwiefel/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/rzwiefel/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rzwiefel/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/rzwiefel/ddf/languages","stargazers_url":"https://api.github.com/repos/rzwiefel/ddf/stargazers","contributors_url":"https://api.github.com/repos/rzwiefel/ddf/contributors","subscribers_url":"https://api.github.com/repos/rzwiefel/ddf/subscribers","subscription_url":"https://api.github.com/repos/rzwiefel/ddf/subscription","commits_url":"https://api.github.com/repos/rzwiefel/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/rzwiefel/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/rzwiefel/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/rzwiefel/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/rzwiefel/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/rzwiefel/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rzwiefel/ddf/merges","archive_url":"https://api.github.com/repos/rzwiefel/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rzwiefel/ddf/downloads","issues_url":"https://api.github.com/repos/rzwiefel/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/rzwiefel/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/rzwiefel/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/rzwiefel/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rzwiefel/ddf/labels{/name}","releases_url":"https://api.github.com/repos/rzwiefel/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/rzwiefel/ddf/deployments","created_at":"2015-06-11T21:19:40Z","updated_at":"2016-02-01T21:59:06Z","pushed_at":"2017-06-22T23:08:30Z","git_url":"git://github.com/rzwiefel/ddf.git","ssh_url":"git@github.com:rzwiefel/ddf.git","clone_url":"https://github.com/rzwiefel/ddf.git","svn_url":"https://github.com/rzwiefel/ddf","homepage":"","size":168405,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"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":"codice:master","ref":"master","sha":"9ac686fca07b7eb3296f4ff68592570704d15fb4","user":{"login":"codice","id":2386734,"avatar_url":"https://avatars1.githubusercontent.com/u/2386734?v=3","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"repo":{"id":15173563,"name":"ddf","full_name":"codice/ddf","owner":{"login":"codice","id":2386734,"avatar_url":"https://avatars1.githubusercontent.com/u/2386734?v=3","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codice/ddf","description":"Distributed Data Framework - an open source, modular integration framework.","fork":false,"url":"https://api.github.com/repos/codice/ddf","forks_url":"https://api.github.com/repos/codice/ddf/forks","keys_url":"https://api.github.com/repos/codice/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codice/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codice/ddf/teams","hooks_url":"https://api.github.com/repos/codice/ddf/hooks","issue_events_url":"https://api.github.com/repos/codice/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/codice/ddf/events","assignees_url":"https://api.github.com/repos/codice/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/codice/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/codice/ddf/tags","blobs_url":"https://api.github.com/repos/codice/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codice/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codice/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/codice/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codice/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/codice/ddf/languages","stargazers_url":"https://api.github.com/repos/codice/ddf/stargazers","contributors_url":"https://api.github.com/repos/codice/ddf/contributors","subscribers_url":"https://api.github.com/repos/codice/ddf/subscribers","subscription_url":"https://api.github.com/repos/codice/ddf/subscription","commits_url":"https://api.github.com/repos/codice/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/codice/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/codice/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/codice/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/codice/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/codice/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codice/ddf/merges","archive_url":"https://api.github.com/repos/codice/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codice/ddf/downloads","issues_url":"https://api.github.com/repos/codice/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/codice/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/codice/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/codice/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codice/ddf/labels{/name}","releases_url":"https://api.github.com/repos/codice/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/codice/ddf/deployments","created_at":"2013-12-13T20:38:28Z","updated_at":"2017-06-22T10:09:52Z","pushed_at":"2017-06-23T16:34:42Z","git_url":"git://github.com/codice/ddf.git","ssh_url":"git@github.com:codice/ddf.git","clone_url":"https://github.com/codice/ddf.git","svn_url":"https://github.com/codice/ddf","homepage":"http://ddf.codice.org","size":322564,"stargazers_count":60,"watchers_count":60,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":113,"mirror_url":null,"open_issues_count":33,"forks":113,"open_issues":33,"watchers":60,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/1975"},"html":{"href":"https://github.com/codice/ddf/pull/1975"},"issue":{"href":"https://api.github.com/repos/codice/ddf/issues/1975"},"comments":{"href":"https://api.github.com/repos/codice/ddf/issues/1975/comments"},"review_comments":{"href":"https://api.github.com/repos/codice/ddf/pulls/1975/comments"},"review_comment":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codice/ddf/pulls/1975/commits"},"statuses":{"href":"https://api.github.com/repos/codice/ddf/statuses/3038d18514ad8ea9575b2c6ec6c2b0e22092b29f"}}}}
{"actor":{"display_login":"coyotesqrl"}}