{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/comments/198655899","pull_request_review_id":132626468,"id":198655899,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODY1NTg5OQ==","diff_hunk":"@@ -0,0 +1,58 @@\n+/*\n+ * Copyright 2018 Google LLC. All rights reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n+ * use this file except in compliance with the License. You may obtain a copy of\n+ * the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n+ * License for the specific language governing permissions and limitations under\n+ * the License.\n+ */\n+\n+package com.google.cloud.tools.jib.frontend;\n+\n+import com.google.cloud.tools.jib.builder.BuildLogger;\n+import java.util.List;\n+import java.util.function.Function;\n+\n+/** Used for validating configuration parameters. */\n+public class ParameterValidator {\n+\n+  /**\n+   * Checks a list for null or empty elements. Warns the user if an empty string is found, and\n+   * throws an error if a null element is found.\n+   *\n+   * @param list the list to check\n+   * @param parameterName the name of the configuration parameter being checked\n+   * @param logger used for displaying messages\n+   * @param exception a function returning the exception to be thrown when a null element is found\n+   * @param <T> the exception type for null elements\n+   * @throws T if a null element is found\n+   */\n+  public static <T extends Throwable> void checkListForNullOrEmpty(","path":"jib-core/src/main/java/com/google/cloud/tools/jib/frontend/ParameterValidator.java","position":37,"original_position":37,"commit_id":"b88060a51cc15b33289392add1f1b5a38e382556","original_commit_id":"b88060a51cc15b33289392add1f1b5a38e382556","user":{"login":"loosebazooka","id":1304826,"node_id":"MDQ6VXNlcjEzMDQ4MjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1304826?v=4","gravatar_id":"","url":"https://api.github.com/users/loosebazooka","html_url":"https://github.com/loosebazooka","followers_url":"https://api.github.com/users/loosebazooka/followers","following_url":"https://api.github.com/users/loosebazooka/following{/other_user}","gists_url":"https://api.github.com/users/loosebazooka/gists{/gist_id}","starred_url":"https://api.github.com/users/loosebazooka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loosebazooka/subscriptions","organizations_url":"https://api.github.com/users/loosebazooka/orgs","repos_url":"https://api.github.com/users/loosebazooka/repos","events_url":"https://api.github.com/users/loosebazooka/events{/privacy}","received_events_url":"https://api.github.com/users/loosebazooka/received_events","type":"User","site_admin":false},"body":"It looks like I'm talking to myself but... perhaps jib-core should not be in the business of providing utility functions to its users. If we need to enforce something, we should still do it in the core-code.\r\n\r\nIf the tools built on top of jib-core needs to use something like checkListForNullOrEmpty, they should implement it themselves or pull it from a guava-like library?\r\n\r\nI don't see it being a huge issue to have this check duplicated in the maven and gradle plugins.","created_at":"2018-06-27T22:05:39Z","updated_at":"2018-06-27T22:05:39Z","html_url":"https://github.com/GoogleContainerTools/jib/pull/456#discussion_r198655899","pull_request_url":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/456","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/comments/198655899"},"html":{"href":"https://github.com/GoogleContainerTools/jib/pull/456#discussion_r198655899"},"pull_request":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/456"}},"in_reply_to_id":198650874},"pull_request":{"url":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/456","id":197777423,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3Nzc3NDIz","html_url":"https://github.com/GoogleContainerTools/jib/pull/456","diff_url":"https://github.com/GoogleContainerTools/jib/pull/456.diff","patch_url":"https://github.com/GoogleContainerTools/jib/pull/456.patch","issue_url":"https://api.github.com/repos/GoogleContainerTools/jib/issues/456","number":456,"state":"open","locked":false,"title":"Warn user about empty strings in config lists, throw more helpful error on null elements, make BuildConfiguration lists immutable","user":{"login":"TadCordle","id":521881,"node_id":"MDQ6VXNlcjUyMTg4MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/521881?v=4","gravatar_id":"","url":"https://api.github.com/users/TadCordle","html_url":"https://github.com/TadCordle","followers_url":"https://api.github.com/users/TadCordle/followers","following_url":"https://api.github.com/users/TadCordle/following{/other_user}","gists_url":"https://api.github.com/users/TadCordle/gists{/gist_id}","starred_url":"https://api.github.com/users/TadCordle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TadCordle/subscriptions","organizations_url":"https://api.github.com/users/TadCordle/orgs","repos_url":"https://api.github.com/users/TadCordle/repos","events_url":"https://api.github.com/users/TadCordle/events{/privacy}","received_events_url":"https://api.github.com/users/TadCordle/received_events","type":"User","site_admin":false},"body":"Fixes #416 ","created_at":"2018-06-27T15:49:46Z","updated_at":"2018-06-27T22:05:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c32e06c0a5e8a7304a27d14f423e29523b7d3b95","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/456/commits","review_comments_url":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/456/comments","review_comment_url":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleContainerTools/jib/issues/456/comments","statuses_url":"https://api.github.com/repos/GoogleContainerTools/jib/statuses/b88060a51cc15b33289392add1f1b5a38e382556","head":{"label":"GoogleContainerTools:fix_null_elements","ref":"fix_null_elements","sha":"b88060a51cc15b33289392add1f1b5a38e382556","user":{"login":"GoogleContainerTools","id":38444003,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NDQ0MDAz","avatar_url":"https://avatars1.githubusercontent.com/u/38444003?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleContainerTools","html_url":"https://github.com/GoogleContainerTools","followers_url":"https://api.github.com/users/GoogleContainerTools/followers","following_url":"https://api.github.com/users/GoogleContainerTools/following{/other_user}","gists_url":"https://api.github.com/users/GoogleContainerTools/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleContainerTools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleContainerTools/subscriptions","organizations_url":"https://api.github.com/users/GoogleContainerTools/orgs","repos_url":"https://api.github.com/users/GoogleContainerTools/repos","events_url":"https://api.github.com/users/GoogleContainerTools/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleContainerTools/received_events","type":"Organization","site_admin":false},"repo":{"id":118497841,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg0OTc4NDE=","name":"jib","full_name":"GoogleContainerTools/jib","owner":{"login":"GoogleContainerTools","id":38444003,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NDQ0MDAz","avatar_url":"https://avatars1.githubusercontent.com/u/38444003?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleContainerTools","html_url":"https://github.com/GoogleContainerTools","followers_url":"https://api.github.com/users/GoogleContainerTools/followers","following_url":"https://api.github.com/users/GoogleContainerTools/following{/other_user}","gists_url":"https://api.github.com/users/GoogleContainerTools/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleContainerTools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleContainerTools/subscriptions","organizations_url":"https://api.github.com/users/GoogleContainerTools/orgs","repos_url":"https://api.github.com/users/GoogleContainerTools/repos","events_url":"https://api.github.com/users/GoogleContainerTools/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleContainerTools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleContainerTools/jib","description":":sailboat: Build container images for your Java applications.","fork":false,"url":"https://api.github.com/repos/GoogleContainerTools/jib","forks_url":"https://api.github.com/repos/GoogleContainerTools/jib/forks","keys_url":"https://api.github.com/repos/GoogleContainerTools/jib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleContainerTools/jib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleContainerTools/jib/teams","hooks_url":"https://api.github.com/repos/GoogleContainerTools/jib/hooks","issue_events_url":"https://api.github.com/repos/GoogleContainerTools/jib/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleContainerTools/jib/events","assignees_url":"https://api.github.com/repos/GoogleContainerTools/jib/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleContainerTools/jib/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleContainerTools/jib/tags","blobs_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleContainerTools/jib/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleContainerTools/jib/languages","stargazers_url":"https://api.github.com/repos/GoogleContainerTools/jib/stargazers","contributors_url":"https://api.github.com/repos/GoogleContainerTools/jib/contributors","subscribers_url":"https://api.github.com/repos/GoogleContainerTools/jib/subscribers","subscription_url":"https://api.github.com/repos/GoogleContainerTools/jib/subscription","commits_url":"https://api.github.com/repos/GoogleContainerTools/jib/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleContainerTools/jib/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleContainerTools/jib/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleContainerTools/jib/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleContainerTools/jib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleContainerTools/jib/merges","archive_url":"https://api.github.com/repos/GoogleContainerTools/jib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleContainerTools/jib/downloads","issues_url":"https://api.github.com/repos/GoogleContainerTools/jib/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleContainerTools/jib/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleContainerTools/jib/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleContainerTools/jib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleContainerTools/jib/labels{/name}","releases_url":"https://api.github.com/repos/GoogleContainerTools/jib/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleContainerTools/jib/deployments","created_at":"2018-01-22T18:30:43Z","updated_at":"2018-06-27T19:35:48Z","pushed_at":"2018-06-27T21:35:42Z","git_url":"git://github.com/GoogleContainerTools/jib.git","ssh_url":"git@github.com:GoogleContainerTools/jib.git","clone_url":"https://github.com/GoogleContainerTools/jib.git","svn_url":"https://github.com/GoogleContainerTools/jib","homepage":"","size":2606,"stargazers_count":207,"watchers_count":207,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":53,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":17,"open_issues":53,"watchers":207,"default_branch":"master"}},"base":{"label":"GoogleContainerTools:master","ref":"master","sha":"369e30d0f67ceba656e7600035259f941963c688","user":{"login":"GoogleContainerTools","id":38444003,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NDQ0MDAz","avatar_url":"https://avatars1.githubusercontent.com/u/38444003?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleContainerTools","html_url":"https://github.com/GoogleContainerTools","followers_url":"https://api.github.com/users/GoogleContainerTools/followers","following_url":"https://api.github.com/users/GoogleContainerTools/following{/other_user}","gists_url":"https://api.github.com/users/GoogleContainerTools/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleContainerTools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleContainerTools/subscriptions","organizations_url":"https://api.github.com/users/GoogleContainerTools/orgs","repos_url":"https://api.github.com/users/GoogleContainerTools/repos","events_url":"https://api.github.com/users/GoogleContainerTools/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleContainerTools/received_events","type":"Organization","site_admin":false},"repo":{"id":118497841,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg0OTc4NDE=","name":"jib","full_name":"GoogleContainerTools/jib","owner":{"login":"GoogleContainerTools","id":38444003,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NDQ0MDAz","avatar_url":"https://avatars1.githubusercontent.com/u/38444003?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleContainerTools","html_url":"https://github.com/GoogleContainerTools","followers_url":"https://api.github.com/users/GoogleContainerTools/followers","following_url":"https://api.github.com/users/GoogleContainerTools/following{/other_user}","gists_url":"https://api.github.com/users/GoogleContainerTools/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleContainerTools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleContainerTools/subscriptions","organizations_url":"https://api.github.com/users/GoogleContainerTools/orgs","repos_url":"https://api.github.com/users/GoogleContainerTools/repos","events_url":"https://api.github.com/users/GoogleContainerTools/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleContainerTools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleContainerTools/jib","description":":sailboat: Build container images for your Java applications.","fork":false,"url":"https://api.github.com/repos/GoogleContainerTools/jib","forks_url":"https://api.github.com/repos/GoogleContainerTools/jib/forks","keys_url":"https://api.github.com/repos/GoogleContainerTools/jib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleContainerTools/jib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleContainerTools/jib/teams","hooks_url":"https://api.github.com/repos/GoogleContainerTools/jib/hooks","issue_events_url":"https://api.github.com/repos/GoogleContainerTools/jib/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleContainerTools/jib/events","assignees_url":"https://api.github.com/repos/GoogleContainerTools/jib/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleContainerTools/jib/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleContainerTools/jib/tags","blobs_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleContainerTools/jib/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleContainerTools/jib/languages","stargazers_url":"https://api.github.com/repos/GoogleContainerTools/jib/stargazers","contributors_url":"https://api.github.com/repos/GoogleContainerTools/jib/contributors","subscribers_url":"https://api.github.com/repos/GoogleContainerTools/jib/subscribers","subscription_url":"https://api.github.com/repos/GoogleContainerTools/jib/subscription","commits_url":"https://api.github.com/repos/GoogleContainerTools/jib/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleContainerTools/jib/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleContainerTools/jib/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleContainerTools/jib/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleContainerTools/jib/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleContainerTools/jib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleContainerTools/jib/merges","archive_url":"https://api.github.com/repos/GoogleContainerTools/jib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleContainerTools/jib/downloads","issues_url":"https://api.github.com/repos/GoogleContainerTools/jib/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleContainerTools/jib/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleContainerTools/jib/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleContainerTools/jib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleContainerTools/jib/labels{/name}","releases_url":"https://api.github.com/repos/GoogleContainerTools/jib/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleContainerTools/jib/deployments","created_at":"2018-01-22T18:30:43Z","updated_at":"2018-06-27T19:35:48Z","pushed_at":"2018-06-27T21:35:42Z","git_url":"git://github.com/GoogleContainerTools/jib.git","ssh_url":"git@github.com:GoogleContainerTools/jib.git","clone_url":"https://github.com/GoogleContainerTools/jib.git","svn_url":"https://github.com/GoogleContainerTools/jib","homepage":"","size":2606,"stargazers_count":207,"watchers_count":207,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":53,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":17,"open_issues":53,"watchers":207,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/456"},"html":{"href":"https://github.com/GoogleContainerTools/jib/pull/456"},"issue":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/issues/456"},"comments":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/issues/456/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/456/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/pulls/456/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleContainerTools/jib/statuses/b88060a51cc15b33289392add1f1b5a38e382556"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"loosebazooka"}}