{"action":"opened","issue":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-connectors/issues/178","repository_url":"https://api.github.com/repos/spring-cloud/spring-cloud-connectors","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-connectors/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-connectors/issues/178/comments","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-connectors/issues/178/events","html_url":"https://github.com/spring-cloud/spring-cloud-connectors/issues/178","id":173495535,"number":178,"title":"CloudFoundryConnector throws NullPointerException when VCAP_SERVICES is null","user":{"login":"brian-l-coker","id":21265617,"avatar_url":"https://avatars.githubusercontent.com/u/21265617?v=3","gravatar_id":"","url":"https://api.github.com/users/brian-l-coker","html_url":"https://github.com/brian-l-coker","followers_url":"https://api.github.com/users/brian-l-coker/followers","following_url":"https://api.github.com/users/brian-l-coker/following{/other_user}","gists_url":"https://api.github.com/users/brian-l-coker/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-l-coker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-l-coker/subscriptions","organizations_url":"https://api.github.com/users/brian-l-coker/orgs","repos_url":"https://api.github.com/users/brian-l-coker/repos","events_url":"https://api.github.com/users/brian-l-coker/events{/privacy}","received_events_url":"https://api.github.com/users/brian-l-coker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-26T16:45:30Z","updated_at":"2016-08-26T16:45:30Z","closed_at":null,"body":"When VCAP_SERVICES is null, the CloudFoundryConnector invokes the ObjectMapper even when VCAP_SERVICES is null or empty. The net result is a NullPointerException. I believe there should be an else block around lines 73-77.\r\n\r\n```\r\nCaused by: java.lang.NullPointerException\r\n\tat java.io.StringReader.<init>(StringReader.java:50) ~[?:1.8.0_66]\r\n\tat org.springframework.cloud.cloudfoundry.com.fasterxml.jackson.core.JsonFactory.createParser(JsonFactory.java:835) ~[spring-cloud-cloudfoundry-connector-1.2.3.RELEASE.jar:?]\r\n\tat org.springframework.cloud.cloudfoundry.com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2098) ~[spring-cloud-cloudfoundry-connector-1.2.3.RELEASE.jar:?]\r\n\tat org.springframework.cloud.cloudfoundry.CloudFoundryConnector.getServicesData(CloudFoundryConnector.java:74) ~[spring-cloud-cloudfoundry-connector-1.2.3.RELEASE.jar:?]\r\n\tat org.springframework.cloud.AbstractCloudConnector.getServiceInfos(AbstractCloudConnector.java:39) ~[spring-cloud-core-1.2.3.RELEASE.jar:?]\r\n\tat org.springframework.cloud.Cloud.getServiceInfos(Cloud.java:89) ~[spring-cloud-core-1.2.3.RELEASE.jar:?]\r\n\tat org.springframework.cloud.Cloud.getServiceInfo(Cloud.java:76) ~[spring-cloud-core-1.2.3.RELEASE.jar:?]\r\n```"}}
{"actor":{"display_login":"brian-l-coker"}}