| Issue 1746: | cloudfoundry-runtime getInstanceInfo method problem | |
| 1 person starred this issue and may be notified of changes. | Back to list |
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC. *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS! *****
************************************************************
Affected Version: All version
What steps will reproduce the problem?
1. Push a standalone app
2. Do not set the URL
3. Call getInstanceInfo method in app.
What is the expected output? What do you see instead?
It will throw a null point exception.
Please provide any additional information below.
Please check the getInstanceInfo method in class CloudEnvironment. It will return a "new ApplicationInstanceInfo(infoMap);" In class ApplicationInstanceInfo, you will find the following code:
public ApplicationInstanceInfo(Map<String, Object> info) {
name = (String) info.get("name");
instanceIndex = (Integer) info.get("instance_index");
uris = (List<String>) info.get("uris");
host = (String) info.get("host");
port = (Integer) info.get("port");
}
If we do not set the url, info.get("port") will get a null. So it will raise a null point exception.
Jan 6, 2013
#1
sop@google.com
Status:
Invalid
|
|
| ► Sign in to add a comment |