{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/37260","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/37260/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/37260/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/37260/events","html_url":"https://github.com/kubernetes/kubernetes/pull/37260","id":190887646,"number":37260,"title":"null pointer exception","user":{"login":"foxyriver","id":20511366,"avatar_url":"https://avatars.githubusercontent.com/u/20511366?v=3","gravatar_id":"","url":"https://api.github.com/users/foxyriver","html_url":"https://github.com/foxyriver","followers_url":"https://api.github.com/users/foxyriver/followers","following_url":"https://api.github.com/users/foxyriver/following{/other_user}","gists_url":"https://api.github.com/users/foxyriver/gists{/gist_id}","starred_url":"https://api.github.com/users/foxyriver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxyriver/subscriptions","organizations_url":"https://api.github.com/users/foxyriver/orgs","repos_url":"https://api.github.com/users/foxyriver/repos","events_url":"https://api.github.com/users/foxyriver/events{/privacy}","received_events_url":"https://api.github.com/users/foxyriver/received_events","type":"User","site_admin":false},"labels":[{"id":477397086,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":200149833,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note","name":"release-note","color":"c2e0c6","default":false},{"id":253450793,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/XS","name":"size/XS","color":"009900","default":false}],"state":"open","locked":false,"assignee":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"assignees":[{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2016-11-22T01:58:34Z","updated_at":"2017-01-11T01:03:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/37260","html_url":"https://github.com/kubernetes/kubernetes/pull/37260","diff_url":"https://github.com/kubernetes/kubernetes/pull/37260.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/37260.patch"},"body":"<!--  Thanks for sending a pull request!  Here are some tips for you:\r\n1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md\r\n2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md\r\n3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes\r\n-->\r\n\r\n**What this PR does / why we need it**:\r\n\r\n> if len(mediaType) == 0 && len(mediaTypes) > 0 {\r\n> \t\tmediaType = mediaTypes[0].MediaType\r\n> \t}\r\n\r\n    \r\nmediaTypes[0] suggests to take the first element of the array mediaTypes, len(mediaTypes)>0 make sure that the first element is existing, avoid runtime error: index out of range.\r\n\r\n**Special notes for your reviewer**:\r\n\r\n**Release note**:\r\n<!--  Steps to write your release note:\r\n1. Use the release-note-* labels to set the release note state (if you have access) \r\n2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. \r\n-->\r\n```release-note\r\n```\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/37260)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/271747382","html_url":"https://github.com/kubernetes/kubernetes/pull/37260#issuecomment-271747382","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/37260","id":271747382,"user":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"created_at":"2017-01-11T01:03:12Z","updated_at":"2017-01-11T01:03:12Z","body":"Sorry for delay, I didn't see this before I went OOO last month."}}
{"actor":{"display_login":"lavalamp"}}