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

Bug 311070

Summary: [doc] FacetModuleCoreSupport.getDynamicWebProjectVersion impl doesn't match javadoc
Product: [WebTools] WTP Source Editing Reporter: Andrew McCulloch <Andrew.McCulloch>
Component: jst.jspAssignee: Nitin Dahyabhai <thatnitind>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: Andrew.McCulloch, cameron.bateman, ccc, raghunathan.srinivasan, rakes123
Version: 3.2   
Target Milestone: 3.3 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Andrew McCulloch CLA 2010-04-29 13:22:26 EDT
Build Identifier: M20100211-1343

org.eclipse.jst.jsp.core.internal.util.FacetModuleCoreSupport#getDynamicWebProjectVersion(IProject) has the following documentation "@return -1 if the project does not have the JST Web facet" however upon inspection of the code it appears to return version 2.5 if the project is null, not a faceted project, or does not contain the jst.web facet.  Note the implementation appears in org.eclipse.jst.jsp.core.internal.util.FacetModuleCoreSupportDelegate.

I am not sure what the intention is so this may just be a javadoc bug but I would assume -1 should be returned instead of 2.5 on a project that doesn't have the jst.web facet.

Reproducible: Always

Steps to Reproduce:
1. Create a Java project (not a faceted project)
2. Call org.eclipse.jst.jsp.core.internal.util.FacetModuleCoreSupport#getDynamicWebProjectVersion(IProject)
3. Verify a return value of 2.5f
Comment 1 Rakesh CLA 2011-01-06 05:35:50 EST
Documentation of FacetModuleCoreSupport has already been changed.Change in documentation of FacetModuleCoreSupportDelegate is still required.
Comment 2 Nitin Dahyabhai CLA 2011-04-28 01:01:23 EDT
Updated.