Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356798

Summary: OptionalClientWizardFragment suffers from obvious ArrayIndexOutOfBounds
Product: [WebTools] WTP ServerTools Reporter: Rob Stryker <stryker>
Component: wst.serverAssignee: Elson Yuen <eyuen7>
Status: NEW --- QA Contact: Elson Yuen <eyuen7>
Severity: normal    
Priority: P3    
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Rob Stryker CLA 2011-09-06 08:00:33 EDT
Starting at line 94, the code is:

  if (clients != null) {
	if (clients.length > 1) {
		getTaskModel().putObject(WizardTaskUtil.TASK_CLIENTS, clients);
		getTaskModel().putObject(WizardTaskUtil.TASK_HAS_CLIENTS, new Boolean(true));
	} else
****		getTaskModel().putObject(WizardTaskUtil.TASK_CLIENT, clients[0]);
  }

In this case, if the clients is not null, but the length is zero, the *** line will throw an ArrayIndexOutOfBounds