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

Bug 216369

Summary: Duplicate (different) values for some ModelProviders
Product: [WebTools] WTP Java EE Tools Reporter: Carl Anderson <ccc>
Component: jst.j2eeAssignee: Kaloyan Raev <kaloyan>
Status: CLOSED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: major    
Priority: P3    
Version: 3.0   
Target Milestone: 3.0 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 205330    
Bug Blocks:    
Attachments:
Description Flags
Delete the duplicate properties none

Description Carl Anderson CLA 2008-01-23 22:14:41 EST
Kaloyan,

	You made a breaking change that caused at least one of the build failures- you deprecated INewServletClassDataModelProperties.DISPLAY_NAME and replaced it with INewWebClassDataModelProperties.DISPLAY_NAME, but you gave INewWebClassDataModelProperties.DISPLAY_NAME a different value in the string.  This causes anyone who uses the old INewServletClassDataModelProperties.DISPLAY_NAME to get an error (as shown in the JUnits).
	My recommendation on what to do to fix this is simple- delete INewServletClassDataModelProperties.DISPLAY_NAME.  Since INewServletClassDataModelProperties extends INewWebClassDataModelProperties, it automatically has the property DISPLAY_NAME.  There won't be two possible values for this.  The same goes for DESCRIPTION and USE_EXISTING_CLASS.  (And any other property that you deprecated in this manner.)
Comment 1 Carl Anderson CLA 2008-01-23 22:21:13 EST
Created attachment 87726 [details]
Delete the duplicate properties

Please review this change (and look through the rest of 205330 to make sure you didn't do the same in any other ModelProvider).
Comment 2 Kaloyan Raev CLA 2008-01-24 09:25:30 EST
Carl, thank you for the notice. 

I have kept the properties in the INewServletClassDataModelProperties as deprecated just for the backward compatibility. But it seems that I have still to learn about backward compatibility of final static fields. 

As you recommended I have removed the properties from the INewServletClassDataModelProperties and now they are only in the INewWebClassDataModelProperties super interface. I have also changed the values of the properties back to their old state: NewServletClassDataModel.DISPLAY_NAME and so on. 

I have also run the failing testAddServlet JUnit locally on my system. 

The changes are released to HEAD with timestamp v200801241418. They should appear with the build after the one which is running at the moment. 
Comment 3 Carl Anderson CLA 2008-02-07 01:10:47 EST
The previously failing JUnits now work, and the code looks acceptable.
Comment 4 Kaloyan Raev CLA 2008-05-12 09:20:20 EDT
Closing