What steps will reproduce the problem?
1.Instantiating the class with one parameter of three
What is the expected output? What do you see instead?
It should return the public info, but instead displays an error stating
there should be one and only one parameter passed in.
What version of the product are you using? On what operating system?
3.2, Mac OSX
Please provide any additional information below.
This can be fixed by changing the logic to test for only one parameter as
follows:
if (application_id == null && application_api_key==null &&
application_canvas_name==null) {
throw new Error("You must specify exactly one of application_id,
application_api_key or application_canvas_name.");
}
if (application_id && !(application_api_key==null &&
application_canvas_name==null)) {
throw new Error("You must specify exactly one of application_id,
application_api_key or application_canvas_name.");
}
if (application_api_key && !(application_id==null &&
application_canvas_name==null)) {
throw new Error("You must specify exactly one of application_id,
application_api_key or application_canvas_name.");
}
if (application_canvas_name && !(application_id==null &&
application_api_key==null)) {
throw new Error("You must specify exactly one of application_id,
application_api_key or application_canvas_name.");
}
Original issue reported on code.google.com by miragevi...@gmail.com on 17 Jun 2009 at 5:19
Original issue reported on code.google.com by
miragevi...@gmail.com
on 17 Jun 2009 at 5:19