My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1746: cloudfoundry-runtime getInstanceInfo method problem
1 person starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  ----
Closed:  Jan 2013


Sign in to add a comment
 
Reported by lynn.ma...@gmail.com, Jan 6, 2013
************************************************************
***** 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
File Android issues at code.google.com/p/android
Status: Invalid
Sign in to add a comment

Powered by Google Project Hosting