{"action":"closed","number":187,"pull_request":{"url":"https://api.github.com/repos/apache/nifi/pulls/187","id":56999344,"html_url":"https://github.com/apache/nifi/pull/187","diff_url":"https://github.com/apache/nifi/pull/187.diff","patch_url":"https://github.com/apache/nifi/pull/187.patch","issue_url":"https://api.github.com/repos/apache/nifi/issues/187","number":187,"state":"closed","locked":false,"title":"NIFI-1434 Prevent array index exception in PutEmail","user":{"login":"rpmiskin","id":5059255,"avatar_url":"https://avatars.githubusercontent.com/u/5059255?v=3","gravatar_id":"","url":"https://api.github.com/users/rpmiskin","html_url":"https://github.com/rpmiskin","followers_url":"https://api.github.com/users/rpmiskin/followers","following_url":"https://api.github.com/users/rpmiskin/following{/other_user}","gists_url":"https://api.github.com/users/rpmiskin/gists{/gist_id}","starred_url":"https://api.github.com/users/rpmiskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpmiskin/subscriptions","organizations_url":"https://api.github.com/users/rpmiskin/orgs","repos_url":"https://api.github.com/users/rpmiskin/repos","events_url":"https://api.github.com/users/rpmiskin/events{/privacy}","received_events_url":"https://api.github.com/users/rpmiskin/received_events","type":"User","site_admin":false},"body":"I've updated PutEmail to avoid an ArrayIndexOutOfBoundsException in the case where the FROM property evaluates to an empty string.\r\n\r\nReading through code in MimeMessage, message.addFrom(InternetAddress[]) is equivalent to message.setFrom(String) in the case where the array has length 1 and will clear the sender when the array has length 0 (rather than throwing an exception).\r\n\r\nI have not made any changes to TestPutEmail. To provide more complete testing I think it would be necessary to do a little refactoring to allow the static call to Transport.send() to be stubbed. Possibly introducing a PutEmail.send() method that would be overridden when testing?","created_at":"2016-01-24T09:39:24Z","updated_at":"2016-02-02T05:32:06Z","closed_at":"2016-02-02T05:32:06Z","merged_at":null,"merge_commit_sha":"db4826c0d751487dbf5b975cb46c52fb0cc77240","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/nifi/pulls/187/commits","review_comments_url":"https://api.github.com/repos/apache/nifi/pulls/187/comments","review_comment_url":"https://api.github.com/repos/apache/nifi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/nifi/issues/187/comments","statuses_url":"https://api.github.com/repos/apache/nifi/statuses/85a65e961365f2bbfa2c3ffa8c830e7ecb8536f0","head":{"label":"rpmiskin:NIFI-1434","ref":"NIFI-1434","sha":"85a65e961365f2bbfa2c3ffa8c830e7ecb8536f0","user":{"login":"rpmiskin","id":5059255,"avatar_url":"https://avatars.githubusercontent.com/u/5059255?v=3","gravatar_id":"","url":"https://api.github.com/users/rpmiskin","html_url":"https://github.com/rpmiskin","followers_url":"https://api.github.com/users/rpmiskin/followers","following_url":"https://api.github.com/users/rpmiskin/following{/other_user}","gists_url":"https://api.github.com/users/rpmiskin/gists{/gist_id}","starred_url":"https://api.github.com/users/rpmiskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpmiskin/subscriptions","organizations_url":"https://api.github.com/users/rpmiskin/orgs","repos_url":"https://api.github.com/users/rpmiskin/repos","events_url":"https://api.github.com/users/rpmiskin/events{/privacy}","received_events_url":"https://api.github.com/users/rpmiskin/received_events","type":"User","site_admin":false},"repo":{"id":48293840,"name":"nifi","full_name":"rpmiskin/nifi","owner":{"login":"rpmiskin","id":5059255,"avatar_url":"https://avatars.githubusercontent.com/u/5059255?v=3","gravatar_id":"","url":"https://api.github.com/users/rpmiskin","html_url":"https://github.com/rpmiskin","followers_url":"https://api.github.com/users/rpmiskin/followers","following_url":"https://api.github.com/users/rpmiskin/following{/other_user}","gists_url":"https://api.github.com/users/rpmiskin/gists{/gist_id}","starred_url":"https://api.github.com/users/rpmiskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpmiskin/subscriptions","organizations_url":"https://api.github.com/users/rpmiskin/orgs","repos_url":"https://api.github.com/users/rpmiskin/repos","events_url":"https://api.github.com/users/rpmiskin/events{/privacy}","received_events_url":"https://api.github.com/users/rpmiskin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rpmiskin/nifi","description":"Mirror of Apache NiFi","fork":true,"url":"https://api.github.com/repos/rpmiskin/nifi","forks_url":"https://api.github.com/repos/rpmiskin/nifi/forks","keys_url":"https://api.github.com/repos/rpmiskin/nifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rpmiskin/nifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rpmiskin/nifi/teams","hooks_url":"https://api.github.com/repos/rpmiskin/nifi/hooks","issue_events_url":"https://api.github.com/repos/rpmiskin/nifi/issues/events{/number}","events_url":"https://api.github.com/repos/rpmiskin/nifi/events","assignees_url":"https://api.github.com/repos/rpmiskin/nifi/assignees{/user}","branches_url":"https://api.github.com/repos/rpmiskin/nifi/branches{/branch}","tags_url":"https://api.github.com/repos/rpmiskin/nifi/tags","blobs_url":"https://api.github.com/repos/rpmiskin/nifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rpmiskin/nifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rpmiskin/nifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/rpmiskin/nifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rpmiskin/nifi/statuses/{sha}","languages_url":"https://api.github.com/repos/rpmiskin/nifi/languages","stargazers_url":"https://api.github.com/repos/rpmiskin/nifi/stargazers","contributors_url":"https://api.github.com/repos/rpmiskin/nifi/contributors","subscribers_url":"https://api.github.com/repos/rpmiskin/nifi/subscribers","subscription_url":"https://api.github.com/repos/rpmiskin/nifi/subscription","commits_url":"https://api.github.com/repos/rpmiskin/nifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/rpmiskin/nifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/rpmiskin/nifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/rpmiskin/nifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/rpmiskin/nifi/contents/{+path}","compare_url":"https://api.github.com/repos/rpmiskin/nifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rpmiskin/nifi/merges","archive_url":"https://api.github.com/repos/rpmiskin/nifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rpmiskin/nifi/downloads","issues_url":"https://api.github.com/repos/rpmiskin/nifi/issues{/number}","pulls_url":"https://api.github.com/repos/rpmiskin/nifi/pulls{/number}","milestones_url":"https://api.github.com/repos/rpmiskin/nifi/milestones{/number}","notifications_url":"https://api.github.com/repos/rpmiskin/nifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rpmiskin/nifi/labels{/name}","releases_url":"https://api.github.com/repos/rpmiskin/nifi/releases{/id}","deployments_url":"https://api.github.com/repos/rpmiskin/nifi/deployments","created_at":"2015-12-19T19:03:27Z","updated_at":"2016-01-22T19:02:15Z","pushed_at":"2016-01-31T07:49:58Z","git_url":"git://github.com/rpmiskin/nifi.git","ssh_url":"git@github.com:rpmiskin/nifi.git","clone_url":"https://github.com/rpmiskin/nifi.git","svn_url":"https://github.com/rpmiskin/nifi","homepage":"","size":37642,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"2f80cd504b1916cccfe32e2d32c2386b4c180d27","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":27911088,"name":"nifi","full_name":"apache/nifi","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/nifi","description":"Mirror of Apache NiFi","fork":false,"url":"https://api.github.com/repos/apache/nifi","forks_url":"https://api.github.com/repos/apache/nifi/forks","keys_url":"https://api.github.com/repos/apache/nifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/nifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/nifi/teams","hooks_url":"https://api.github.com/repos/apache/nifi/hooks","issue_events_url":"https://api.github.com/repos/apache/nifi/issues/events{/number}","events_url":"https://api.github.com/repos/apache/nifi/events","assignees_url":"https://api.github.com/repos/apache/nifi/assignees{/user}","branches_url":"https://api.github.com/repos/apache/nifi/branches{/branch}","tags_url":"https://api.github.com/repos/apache/nifi/tags","blobs_url":"https://api.github.com/repos/apache/nifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/nifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/nifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/nifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/nifi/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/nifi/languages","stargazers_url":"https://api.github.com/repos/apache/nifi/stargazers","contributors_url":"https://api.github.com/repos/apache/nifi/contributors","subscribers_url":"https://api.github.com/repos/apache/nifi/subscribers","subscription_url":"https://api.github.com/repos/apache/nifi/subscription","commits_url":"https://api.github.com/repos/apache/nifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/nifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/nifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/nifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/nifi/contents/{+path}","compare_url":"https://api.github.com/repos/apache/nifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/nifi/merges","archive_url":"https://api.github.com/repos/apache/nifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/nifi/downloads","issues_url":"https://api.github.com/repos/apache/nifi/issues{/number}","pulls_url":"https://api.github.com/repos/apache/nifi/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/nifi/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/nifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/nifi/labels{/name}","releases_url":"https://api.github.com/repos/apache/nifi/releases{/id}","deployments_url":"https://api.github.com/repos/apache/nifi/deployments","created_at":"2014-12-12T08:00:05Z","updated_at":"2016-01-30T19:43:05Z","pushed_at":"2016-02-02T04:00:30Z","git_url":"git://github.com/apache/nifi.git","ssh_url":"git@github.com:apache/nifi.git","clone_url":"https://github.com/apache/nifi.git","svn_url":"https://github.com/apache/nifi","homepage":"","size":41975,"stargazers_count":203,"watchers_count":203,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":172,"mirror_url":"git://git.apache.org/nifi.git","open_issues_count":10,"forks":172,"open_issues":10,"watchers":203,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/nifi/pulls/187"},"html":{"href":"https://github.com/apache/nifi/pull/187"},"issue":{"href":"https://api.github.com/repos/apache/nifi/issues/187"},"comments":{"href":"https://api.github.com/repos/apache/nifi/issues/187/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/nifi/pulls/187/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/nifi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/nifi/pulls/187/commits"},"statuses":{"href":"https://api.github.com/repos/apache/nifi/statuses/85a65e961365f2bbfa2c3ffa8c830e7ecb8536f0"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":5,"review_comments":0,"commits":1,"additions":189,"deletions":38,"changed_files":2}}