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

Bug 329707

Summary: JUnits testing providers for non existing project are incorrect
Product: [WebTools] WTP Java EE Tools Reporter: Roberto Sanchez Herrera <shr31223>
Component: jst.j2eeAssignee: Roberto Sanchez Herrera <shr31223>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: ccc, jsholl, kaloyan
Version: 3.2Flags: cbridgha: review+
Target Milestone: 3.2.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Check for null instead of IllegalArgumentException. ccc: iplog+

Description Roberto Sanchez Herrera CLA 2010-11-08 15:58:56 EST
Build Identifier: I-3.3.0-20101021033924

The JUnits org.eclipse.jst.jee.model.ejb.tests.testProviderForNonExistingProject() and org.eclipse.jst.jee.model.web.tests.testProviderForNonExistingProject() check fot an IllegalArgumentException when ModelProviderManager.getModelProvider(IProject) is called on non-existing project. But the method is returning null. In fact, the API says it expects a null back. 

Reproducible: Always

Steps to Reproduce:
1. Run the AllAnnotationModelModelTests suite.
Comment 1 Roberto Sanchez Herrera CLA 2010-11-08 16:01:08 EST
Created attachment 182664 [details]
Check for null instead of IllegalArgumentException.
Comment 2 Chuck Bridgham CLA 2010-11-10 10:14:23 EST
approve
Comment 3 Jason Sholl CLA 2010-11-10 12:31:34 EST
Code checked into both 32M and HEAD for WTP 3.2.3 and 3.3