Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360265 - Exception when creating a new Dynamic Web Project with project name as empty
Summary: Exception when creating a new Dynamic Web Project with project name as empty
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.5   Edit
Assignee: Rosendo Martinez CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on: 357016
Blocks:
  Show dependency tree
 
Reported: 2011-10-07 13:50 EDT by Rosendo Martinez CLA
Modified: 2012-02-22 12:59 EST (History)
4 users (show)

See Also:
ccc: pmc_approved? (david_williams)
raghunathan.srinivasan: pmc_approved+
ccc: pmc_approved? (naci.dai)
ccc: pmc_approved? (deboer)
ccc: pmc_approved? (neil.hauge)
ccc: pmc_approved? (kaloyan)
ccc: pmc_approved? (cbridgha)
cbridgha: review+


Attachments
R3_2_maintenance patch (6.41 KB, patch)
2011-10-07 15:39 EDT, Rosendo Martinez CLA
ccc: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rosendo Martinez CLA 2011-10-07 13:50:17 EDT
Build Identifier: 

An exception is shown when a new Dynamic Web Project is created.

Steps to reproduce:

1. Open the Dynamic Web Project wizard.
2. Enter a single letter as project Name.
3. Remove that letter, so the project Name is empty.

java.lang.IllegalArgumentException exception is shown.

Reproducible: Always
Comment 1 Carl Anderson CLA 2011-10-07 14:18:36 EDT
This was caused by the fix for bug 357016.  All of the DataModelProviders it changed should be updated to handle this case.
Comment 2 Rosendo Martinez CLA 2011-10-07 15:39:22 EDT
Created attachment 204773 [details]
R3_2_maintenance patch
Comment 3 Chuck Bridgham CLA 2011-10-07 15:47:57 EDT
approved
Comment 4 Carl Anderson CLA 2011-10-11 12:40:19 EDT
Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such.

This is a regression from WTP 3.2.4 that was introduced by bug 357016.  The code that was added there checked to see if the project exists, but did not check to see if the project name was null first.

Is there a work-around? If so, why do you believe the work-around is insufficient?

The only work-around is to never clear out the project name in any of the wizards.  That is unacceptable.

How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added?

This fix has been tested by hand and by having the Java EE Tools JUnit bucket run against it.

Give a brief technical overview. Who has reviewed this fix?

In the various *DataModelProviders that were previously effected, the project name is now checked to make sure it is not null before being used.  Chuck Bridgham and myself have reviewed the fix.

What is the risk associated with this fix? 

Low risk fix - this is adding a null check for the project name
Comment 5 Roberto Sanchez Herrera CLA 2011-10-11 21:38:43 EDT
Code committed to R3_2_maintenance for 3.2.5 and to HEAD for 3.4, except for the changes in the plugin org.eclipse.jst.j2ee.ejb, because I'm not a commiter for that. Carl, would you mind committing the EJB code?
Comment 6 Carl Anderson CLA 2011-10-13 13:47:49 EDT
I committed the EJB portion to R3_2_maintenance for WTP 3.2.5 and HEAD for 3.4.0.
Comment 7 Carl Anderson CLA 2011-10-20 00:40:20 EDT
Committed to R3_3_maintenance for WTP 3.3.2.